aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pending-tx.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-05-16 06:07:38 +0800
committerDan Finlay <dan@danfinlay.com>2017-05-16 06:07:38 +0800
commit4b341e6a955d1fa71decfb021a86e7da09a933b0 (patch)
tree58cfc349cb806f843ab88338ea41fea3e17d2c5a /ui/app/components/pending-tx.js
parentc4be4c7195c05936fba61783b9f8a3c96d161ce0 (diff)
downloadtangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar
tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.gz
tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.bz2
tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.lz
tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.xz
tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.tar.zst
tangerine-wallet-browser-4b341e6a955d1fa71decfb021a86e7da09a933b0.zip
Got test failing nearly correctly
Diffstat (limited to 'ui/app/components/pending-tx.js')
-rw-r--r--ui/app/components/pending-tx.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js
index fb555b821..d31ccf2e5 100644
--- a/ui/app/components/pending-tx.js
+++ b/ui/app/components/pending-tx.js
@@ -380,11 +380,22 @@ PendingTx.prototype.onSubmit = function (event) {
}
PendingTx.prototype.checkValidity = function() {
- const form = document.querySelector('form#pending-tx-form')
+ const form = this.getFormEl()
+ console.log("check validity got form el:")
+ console.dir(form)
const valid = form.checkValidity()
return valid
}
+PendingTx.prototype.getFormEl = function() {
+ const form = document.querySelector('form#pending-tx-form')
+ // Stub out form for unit tests:
+ if (!form) {
+ return { checkValidity() { return true } }
+ }
+ return form
+}
+
// After a customizable state value has been updated,
PendingTx.prototype.gatherTxMeta = function () {
log.debug(`pending-tx gatherTxMeta`)