diff --git a/packages/light-react/src/stores/sendStore.js b/packages/light-react/src/stores/sendStore.js index 72f66fc3139473e954c89d79b2d0e644597f6d0f..abb1b4e274cb0592bc79d522cfdad282ae6f9b82 100644 --- a/packages/light-react/src/stores/sendStore.js +++ b/packages/light-react/src/stores/sendStore.js @@ -102,18 +102,12 @@ class SendStore { @computed get isTxValid () { - // The address should be okay - if (!this.tx || !isAddress(this.tx.to)) { - return false; - } - - // The amount should be a number - if (!Number.isFinite(this.tx.amount)) { - return false; - } - - // The gasPrice should be a number - if (!Number.isFinite(this.tx.gasPrice)) { + if ( + !this.tx || // There should be a tx + !isAddress(this.tx.to) || // The address should be okay + isNaN(this.tx.amount) || + isNaN(this.tx.gasPrice) + ) { return false; }