From fdffb6fedc6a29a2f952f7db669bdc2907afb854 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 14 Aug 2017 18:46:04 -0700 Subject: introduce tx-state-history-helper and diff-based history --- test/data/v17-long-history.json | 3053 ++++++++++++++++++++++++++++++++++ test/unit/tx-controller-test.js | 13 +- test/unit/tx-state-history-helper.js | 23 + 3 files changed, 3084 insertions(+), 5 deletions(-) create mode 100644 test/data/v17-long-history.json create mode 100644 test/unit/tx-state-history-helper.js (limited to 'test') diff --git a/test/data/v17-long-history.json b/test/data/v17-long-history.json new file mode 100644 index 000000000..a33d425f8 --- /dev/null +++ b/test/data/v17-long-history.json @@ -0,0 +1,3053 @@ +{ + "meta": { + "version": 17 + }, + "data": { + "config": {}, + "NetworkController": { + "provider": { + "type": "ropsten", + "rpcTarget": "https://ropsten.infura.io/metamask" + }, + "network": "3" + }, + "NoticeController": { + "noticesList": [ + { + "read": true, + "date": "Thu Feb 09 2017", + "title": "Terms of Use", + "body": "", + "id": 0 + }, + { + "read": true, + "date": "Mon May 08 2017", + "title": "Privacy Notice", + "body": "", + "id": 2 + } + ] + }, + "CurrencyController": { + "currentCurrency": "USD", + "conversionRate": 295.81988556, + "conversionDate": 1502734981 + }, + "KeyringController": { + "vault": "{\"data\":\"fFwVD3Msyq1o9NsDbjMlyJ1ZfoMcqfTgjR9cium0C5Vnpk9IM6f/RTVXfk0J4c4UkbgbKd++q8t1S+D22s7Ddz/BT/fe0GrbwPvAYQi1oJuOI9/Lf7I0JbESGv4PheijCIH4h/FiO+tIAuqM0Co3PULM4mOHdzXD8SWmzxbDGx+4wG84EQE9a1NEbqEjyqrX02h3NwZsjrSeuV5TibpGJB9vnKNpDu9wF0DVKLtLCG5n67uoTI/ve9Z7hIDa03vNi/71iE4avFb6ogE2SAkFDncEcU0xXVkBMapBXjrpe5sIq08Ddo0Hhi4fkd4yFW77sAH4TKzd6bWSn2AK8HL8Gpcrk4R6Cvv8EtyjUqsOJfE4AmYI6rWfFutLqEAp\",\"iv\":\"9fJ/OGDVwUnu3H0U71qOGA==\",\"salt\":\"5yGOu/+yrrb3DyP+cvMKIZqjhSjrEY+bnceHnz9n8gM=\"}", + "walletNicknames": { + "0x3ae39e89dc7e736cce53091057a45bf44b1a566c": "Account 1", + "0xa7a467edcb16a51976418ec6133f14f7939dc378": "Account 2", + "0x03ce38bd04b4ad7581a7070570381a530951ebbe": "Account 3" + } + }, + "PreferencesController": { + "frequentRpcList": [], + "currentAccountTab": "history", + "tokens": [], + "selectedAddress": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c" + }, + "seedWords": null, + "InfuraController": { + "infuraNetworkStatus": { + "mainnet": "degraded", + "ropsten": "ok", + "kovan": "ok", + "rinkeby": "ok" + } + }, + "BlacklistController": { + "phishing": { + "version": 2, + "tolerance": 2, + "fuzzylist": [ + "metamask.io", + "myetherwallet.com" + ], + "whitelist": [ + "metamask.io", + "myetherwallet.com", + "ethereum.org", + "myetheroll.com", + "myetherapi.com", + "ledgerwallet.com", + "etherscan.io", + "etherid.org", + "ether.cards", + "etheroll.com", + "ethnews.com", + "ethex.market", + "ethereumdev.io", + "ethereumdev.kr", + "dether.io", + "ethermine.org", + "slaask.com", + "etherbtc.io", + "ethereal.capital", + "etherisc.com", + "m.famalk.net", + "etherecho.com", + "ethereum.os.tc", + "theethereum.wiki", + "metajack.im", + "etherhub.io", + "ethereum.network", + "ethereum.link", + "ethereum.com", + "prethereum.org", + "ethereumj.io", + "etheraus.com", + "ethereum.dev", + "1ethereum.ru", + "ethereum.nz", + "nethereum.com", + "metabank.com", + "metamas.com", + "metabase.com" + ], + "blacklist": [ + "numerai.tech", + "decentraiand.org", + "blockcrein.info", + "blockchealn.info", + "bllookchain.info", + "blockcbhain.info", + "myetherwallet.com.ethpromonodes.com", + "mettamask.io", + "tokenswap.org", + "netherum.com", + "etherexx.org", + "etherume.io", + "ethereum.plus", + "ehtereum.org", + "etereurm.org", + "etheream.com", + "ethererum.org", + "ethereum.io", + "0xtoken.com", + "cryptoalliance.herokuapp.com", + "bitspark2.com", + "indorsetoken.com", + "bittreat.com", + "iconexus.tk", + "iconexus.ml", + "iconexus.ga", + "iconexus.cf", + "etherwallet.online", + "wallet-ethereum.net", + "bitsdigit.com", + "etherswap.org", + "eos.ac", + "uasfwallet.com", + "ziber.io", + "multiply-ethereum.info", + "bittrex.comze.com", + "karbon.vacau.com", + "etherdelta.gitlhub.io", + "etherdelta.glthub.io", + "digitaldevelopersfund.vacau.com", + "district-0x.io", + "coin-dash.com", + "coindash.ru", + "district0x.net", + "aragonproject.io", + "coin-wallet.info", + "coinswallet.info", + "contribute-status.im", + "ether-api.com", + "ether-wall.com", + "mycoinwallet.net", + "ethereumchamber.com", + "ethereumchamber.net", + "ethereumchest.com", + "myetherweb.com.de", + "myetherieumwallet.com", + "myetehrwallet.com", + "myeterwalet.com", + "myetherwaiiet.com", + "myetherwallet.info", + "myetherwallet.ch", + "myetherwallet.om", + "myethervallet.com", + "myetherwallet.com.cm", + "myetherwallet.com.co", + "myetherwallet.com.de", + "myetherwallet.com.gl", + "myetherwallet.com.im", + "myetherwallet.com.ua", + "secure-myetherwallet.com", + "update-myetherwallet.com", + "wwwmyetherwallet.com", + "myeatherwallet.com", + "myetharwallet.com", + "myelherwallel.com", + "myetherwaillet.com", + "myetherwaliet.com", + "myetherwallel.com", + "myetherwallet.cam", + "myetherwallet.cc", + "myetherwallet.co", + "myetherwallet.cm", + "myetherwallet.cz", + "myetherwallet.org", + "myetherwallet.tech", + "myetherwallet.top", + "myetherwallet.net", + "etherclassicwallet.com", + "omg-omise.co", + "omise-go.com", + "tenx-tech.com", + "tokensale-tenx.tech", + "ubiqcoin.org", + "metamask.com", + "ethtrade.io", + "myetcwallet.com", + "account-kigo.net", + "bitcoin-wallet.net", + "blocklichan.info", + "bloclkicihan.info", + "coindash.ml", + "eos-bonus.com", + "eos-io.info", + "ether-wallet.net", + "ethereum-wallet.info", + "ethereum-wallet.net", + "ethereumchest.net", + "reservations-kigo.net", + "reservations-lodgix.com", + "secure-liverez.com", + "secure-onerooftop.com", + "settings-liverez.com", + "software-liverez.com", + "software-lodgix.com", + "unhackableetherwallets.com", + "www-myetherwallet.com", + "etherwallet.co.za", + "etherwalletchain.com", + "etherwallets.net", + "etherwallets.nl", + "my-ethwallet.com", + "my.ether-wallet.co", + "myetherwallet.com.am", + "myetherwallet.com.ht", + "myetherwalletcom.com", + "xn--myetherwalle-xoc.com", + "xn--myetherwalle-44i.com", + "xn--myetherwalle-xhk.com", + "xn--myetherwallt-cfb.com", + "xn--myetherwallt-6tb.com", + "xn--myetherwallt-xub.com", + "xn--myetherwallt-ovb.com", + "xn--myetherwallt-fwb.com", + "xn--myetherwallt-5wb.com", + "xn--myetherwallt-jzi.com", + "xn--myetherwallt-2ck.com", + "xn--myetherwallt-lok.com", + "xn--myetherwallt-lsl.com", + "xn--myetherwallt-ce6f.com", + "xn--myetherwalet-mcc.com", + "xn--myetherwalet-xhf.com", + "xn--myetherwalet-lcc.com", + "xn--myetherwaet-15ba.com", + "xn--myetherwalet-whf.com", + "xn--myetherwaet-v2ea.com", + "xn--myetherwllet-59a.com", + "xn--myetherwllet-jbb.com", + "xn--myetherwllet-wbb.com", + "xn--myetherwllet-9bb.com", + "xn--myetherwllet-ncb.com", + "xn--myetherwllet-0cb.com", + "xn--myetherwllet-5nb.com", + "xn--myetherwllet-ktd.com", + "xn--myetherwllet-mre.com", + "xn--myetherwllet-76e.com", + "xn--myetherwllet-o0l.com", + "xn--myetherwllet-c45f.com", + "xn--myetherallet-ejn.com", + "xn--myethewallet-4nf.com", + "xn--myethewallet-iof.com", + "xn--myethewallet-mpf.com", + "xn--myethewallet-6bk.com", + "xn--myethewallet-i31f.com", + "xn--myethrwallet-feb.com", + "xn--myethrwallt-fbbf.com", + "xn--myethrwallet-seb.com", + "xn--myethrwallt-rbbf.com", + "xn--myethrwallet-5eb.com", + "xn--myethrwallt-3bbf.com", + "xn--myethrwallet-0tb.com", + "xn--myethrwallt-tpbf.com", + "xn--myethrwallet-rub.com", + "xn--myethrwallt-iqbf.com", + "xn--myethrwallet-ivb.com", + "xn--myethrwallt-6qbf.com", + "xn--myethrwallet-8vb.com", + "xn--myethrwallt-vrbf.com", + "xn--myethrwallet-zwb.com", + "xn--myethrwallt-ksbf.com", + "xn--myethrwallet-dzi.com", + "xn--myethrwallt-wbif.com", + "xn--myethrwallet-wck.com", + "xn--myethrwallt-skjf.com", + "xn--myethrwallet-fok.com", + "xn--myethrwallt-fvjf.com", + "xn--myethrwallet-fsl.com", + "xn--myethrwallt-fwkf.com", + "xn--myethrwallet-5d6f.com", + "xn--myethrwallt-319ef.com", + "xn--myeterwallet-ufk.com", + "xn--myeterwallet-nrl.com", + "xn--myeterwallet-von.com", + "xn--myeterwallet-jl6c.com", + "xn--myeherwallet-ooc.com", + "xn--myeherwalle-6hci.com", + "xn--myeherwallet-v4i.com", + "xn--myeherwalle-zgii.com", + "xn--myeherwallet-ohk.com", + "xn--myeherwalle-6oji.com", + "xn--mytherwallet-ceb.com", + "xn--mythrwallet-cbbc.com", + "xn--mythrwallt-c7acf.com", + "xn--mytherwallet-peb.com", + "xn--mythrwallet-obbc.com", + "xn--mythrwallt-n7acf.com", + "xn--mytherwallet-2eb.com", + "xn--mythrwallet-0bbc.com", + "xn--mythrwallt-y7acf.com", + "xn--mytherwallet-xtb.com", + "xn--mythrwallet-qpbc.com", + "xn--mythrwallt-jlbcf.com", + "xn--mytherwallet-oub.com", + "xn--mythrwallet-fqbc.com", + "xn--mythrwallt-5lbcf.com", + "xn--mythrwallet-3qbc.com", + "xn--mythrwallt-smbcf.com", + "xn--mytherwallet-5vb.com", + "xn--mythrwallet-srbc.com", + "xn--mythrwallt-fnbcf.com", + "xn--mytherwallet-wwb.com", + "xn--mythrwallet-hsbc.com", + "xn--mythrwallt-1nbcf.com", + "xn--mytherwallet-9yi.com", + "xn--mythrwallet-tbic.com", + "xn--mythrwallt-dnhcf.com", + "xn--mytherwallet-tck.com", + "xn--mythrwallet-pkjc.com", + "xn--mythrwallt-lsicf.com", + "xn--mytherwallet-cok.com", + "xn--mythrwallet-cvjc.com", + "xn--mythrwallt-c2icf.com", + "xn--mytherwallet-csl.com", + "xn--mythrwallet-cwkc.com", + "xn--mythrwallt-c0jcf.com", + "xn--mytherwallet-2d6f.com", + "xn--mythrwallet-019ec.com", + "xn--mythrwallt-yq3ecf.com", + "xn--metherwallet-qlb.com", + "xn--metherwallet-1uf.com", + "xn--metherwallet-iyi.com", + "xn--metherwallet-zhk.com", + "xn--metherwallet-3ml.com", + "xn--mytherwallet-fvb.com", + "xn--myetherwallt-7db.com", + "xn--myetherwallt-leb.com", + "xn--myetherwallt-yeb.com", + "xn--yetherwallet-vjf.com", + "xn--yetherwallet-dfk.com", + "xn--yetherwallet-1t1f.com", + "xn--yetherwallet-634f.com" + ] + } + }, + "AddressBookController": { + "addressBook": [] + }, + "TransactionController": { + "transactions": [ + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "history": [ + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "3b9aca00", + "gas": "0x7b0d", + "nonce": 0 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + } + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "3b9aca00", + "gas": "0x7b0d", + "nonce": 0 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + } + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + } + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + } + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264", + "hash": "0x38c254639139c94303a3141aee041b15301509e743f08569ffac6aca17518012" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264", + "hash": "0x38c254639139c94303a3141aee041b15301509e743f08569ffac6aca17518012" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264", + "hash": "0x38c254639139c94303a3141aee041b15301509e743f08569ffac6aca17518012" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264", + "hash": "0x38c254639139c94303a3141aee041b15301509e743f08569ffac6aca17518012" + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264", + "hash": "0x38c254639139c94303a3141aee041b15301509e743f08569ffac6aca17518012", + "retryCount": 1 + }, + { + "id": 6616756286038869, + "time": 1502438908445, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264", + "hash": "0x38c254639139c94303a3141aee041b15301509e743f08569ffac6aca17518012", + "retryCount": 1 + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16643c", + "baseCount": 0, + "baseCountHex": "0x0", + "pendingCount": 0 + }, + "rawTx": "0xf86380843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a02e45f61129f0c97634e37a1823b858df7b0dfc867a44949aae7dd9bcea1c1b5aa03b1f002cda0872d40517d5b26caefa3e407ec8fd03bc7dc2d995b84726961264", + "hash": "0x38c254639139c94303a3141aee041b15301509e743f08569ffac6aca17518012", + "retryCount": 1 + }, + { + "id": 6616756286038870, + "time": 1502573153664, + "status": "rejected", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d" + }, + "history": [ + { + "id": 6616756286038870, + "time": 1502573153664, + "status": "rejected", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038870, + "time": 1502573153664, + "status": "rejected", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "history": [ + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d", + "nonce": 1 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + } + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "28fa6ae00", + "gas": "0x7b0d", + "nonce": 1 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + } + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + } + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + } + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0", + "hash": "0xeb1c57dec9df8410bcc65374c7f684fc8ebfcda6865a149e38bb000fa706a150" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0", + "hash": "0xeb1c57dec9df8410bcc65374c7f684fc8ebfcda6865a149e38bb000fa706a150" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0", + "hash": "0xeb1c57dec9df8410bcc65374c7f684fc8ebfcda6865a149e38bb000fa706a150" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0", + "hash": "0xeb1c57dec9df8410bcc65374c7f684fc8ebfcda6865a149e38bb000fa706a150" + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0", + "hash": "0xeb1c57dec9df8410bcc65374c7f684fc8ebfcda6865a149e38bb000fa706a150", + "retryCount": 1 + }, + { + "id": 6616756286038871, + "time": 1502573157128, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x28fa6ae00", + "gas": "0x7b0d", + "nonce": "0x01", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0", + "hash": "0xeb1c57dec9df8410bcc65374c7f684fc8ebfcda6865a149e38bb000fa706a150", + "retryCount": 1 + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x168739", + "baseCount": 1, + "baseCountHex": "0x1", + "pendingCount": 0 + }, + "rawTx": "0xf8640185028fa6ae00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a06261831b3d599a90dc24fac67bc648fd58cab2036e4e8dfbbb5c00c3fd9cf66ba00e2ea6ebc63ba715a94dc94e24120639c4ad60832d3285dd558929a61cc18cc0", + "hash": "0xeb1c57dec9df8410bcc65374c7f684fc8ebfcda6865a149e38bb000fa706a150", + "retryCount": 1 + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "history": [ + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 2 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + } + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 2 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + } + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + } + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + } + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc", + "hash": "0xc28ceb1e2c4e5c61b805b181e3cc99dd7bade58935233fab76c63cedfd494270" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc", + "hash": "0xc28ceb1e2c4e5c61b805b181e3cc99dd7bade58935233fab76c63cedfd494270" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc", + "hash": "0xc28ceb1e2c4e5c61b805b181e3cc99dd7bade58935233fab76c63cedfd494270" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc", + "hash": "0xc28ceb1e2c4e5c61b805b181e3cc99dd7bade58935233fab76c63cedfd494270" + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc", + "hash": "0xc28ceb1e2c4e5c61b805b181e3cc99dd7bade58935233fab76c63cedfd494270", + "retryCount": 1 + }, + { + "id": 6616756286038872, + "time": 1502734903652, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x02", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc", + "hash": "0xc28ceb1e2c4e5c61b805b181e3cc99dd7bade58935233fab76c63cedfd494270", + "retryCount": 1 + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b066", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 0 + }, + "rawTx": "0xf864028504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa057380f9007a48d4bce31792859b1a25cb2b45ba615e7951d8e8a925360a0b301a042393e72d1a96a2605c0da95705c5f3f7c744f0affcac01e0a64721037f04adc", + "hash": "0xc28ceb1e2c4e5c61b805b181e3cc99dd7bade58935233fab76c63cedfd494270", + "retryCount": 1 + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "history": [ + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + } + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + } + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + } + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + } + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897", + "hash": "0xfcc66b8002c64a5aaa076adea7f7e48d194de10e40eb64924c8de344805c8cb7" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897", + "hash": "0xfcc66b8002c64a5aaa076adea7f7e48d194de10e40eb64924c8de344805c8cb7" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897", + "hash": "0xfcc66b8002c64a5aaa076adea7f7e48d194de10e40eb64924c8de344805c8cb7" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897", + "hash": "0xfcc66b8002c64a5aaa076adea7f7e48d194de10e40eb64924c8de344805c8cb7" + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897", + "hash": "0xfcc66b8002c64a5aaa076adea7f7e48d194de10e40eb64924c8de344805c8cb7", + "retryCount": 2 + }, + { + "id": 6616756286038873, + "time": 1502734910224, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x3b9aca00", + "gas": "0x7b0d", + "nonce": "0x03", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897", + "hash": "0xfcc66b8002c64a5aaa076adea7f7e48d194de10e40eb64924c8de344805c8cb7", + "retryCount": 2 + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 1 + }, + "rawTx": "0xf86303843b9aca00827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0e442afe9386066936f556d852a296d22b8392652aa2ddb26969d83d661759ee1a06dc55b164f666a37107e86d575d2701602fc100f0ef4875736d45995150d4897", + "hash": "0xfcc66b8002c64a5aaa076adea7f7e48d194de10e40eb64924c8de344805c8cb7", + "retryCount": 2 + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "history": [ + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 4 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + } + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 4 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + } + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + } + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + } + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3", + "hash": "0x9258ed7e451402612f572cbef52b63cd63cc2c59f443a207b7b4f8d317958635" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3", + "hash": "0x9258ed7e451402612f572cbef52b63cd63cc2c59f443a207b7b4f8d317958635" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3", + "hash": "0x9258ed7e451402612f572cbef52b63cd63cc2c59f443a207b7b4f8d317958635" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3", + "hash": "0x9258ed7e451402612f572cbef52b63cd63cc2c59f443a207b7b4f8d317958635" + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3", + "hash": "0x9258ed7e451402612f572cbef52b63cd63cc2c59f443a207b7b4f8d317958635", + "retryCount": 4 + }, + { + "id": 6616756286038874, + "time": 1502734917414, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x04", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3", + "hash": "0x9258ed7e451402612f572cbef52b63cd63cc2c59f443a207b7b4f8d317958635", + "retryCount": 4 + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b067", + "baseCount": 2, + "baseCountHex": "0x2", + "pendingCount": 2 + }, + "rawTx": "0xf864048504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a04be1c01535745fa7ec7aeb6e0b64d009981713808ca443b181fad802ce941352a03887e90375d9225b8dfd0d42324eed8eb4982fd14ea7b4069290237b29d1dcd3", + "hash": "0x9258ed7e451402612f572cbef52b63cd63cc2c59f443a207b7b4f8d317958635", + "retryCount": 4 + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "history": [ + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 5 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + } + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 5 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + } + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + } + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + } + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5", + "hash": "0x67cdff49c1f8ed506c759fc8fd7ffe93d59fcb3bfd926b964cad47e2e504dc9e" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5", + "hash": "0x67cdff49c1f8ed506c759fc8fd7ffe93d59fcb3bfd926b964cad47e2e504dc9e" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5", + "hash": "0x67cdff49c1f8ed506c759fc8fd7ffe93d59fcb3bfd926b964cad47e2e504dc9e" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5", + "hash": "0x67cdff49c1f8ed506c759fc8fd7ffe93d59fcb3bfd926b964cad47e2e504dc9e" + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5", + "hash": "0x67cdff49c1f8ed506c759fc8fd7ffe93d59fcb3bfd926b964cad47e2e504dc9e", + "retryCount": 3 + }, + { + "id": 6616756286038875, + "time": 1502734922745, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x05", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5", + "hash": "0x67cdff49c1f8ed506c759fc8fd7ffe93d59fcb3bfd926b964cad47e2e504dc9e", + "retryCount": 3 + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 2 + }, + "rawTx": "0xf864058504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c808029a0dac4756e84c008714b3b8b43807157ed63737450780bc57590e930c8a360750ca00b43ac8ec5235f57ccca7e68ce8fbf77f43d6ffa5fbff296cba66cef47889cf5", + "hash": "0x67cdff49c1f8ed506c759fc8fd7ffe93d59fcb3bfd926b964cad47e2e504dc9e", + "retryCount": 3 + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "history": [ + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "unapproved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d" + }, + "gasLimitSpecified": false, + "estimatedGas": "5209" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 6 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + } + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "approved", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "4a817c800", + "gas": "0x7b0d", + "nonce": 6 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + } + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + } + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + } + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7", + "hash": "0x2c12c403aeb62a92bd5eabd3edcc38ab9e63bb0c93f706520bd2042894737ad1" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "signed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7", + "hash": "0x2c12c403aeb62a92bd5eabd3edcc38ab9e63bb0c93f706520bd2042894737ad1" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7", + "hash": "0x2c12c403aeb62a92bd5eabd3edcc38ab9e63bb0c93f706520bd2042894737ad1" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "submitted", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7", + "hash": "0x2c12c403aeb62a92bd5eabd3edcc38ab9e63bb0c93f706520bd2042894737ad1" + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7", + "hash": "0x2c12c403aeb62a92bd5eabd3edcc38ab9e63bb0c93f706520bd2042894737ad1", + "retryCount": 5 + }, + { + "id": 6616756286038876, + "time": 1502734928623, + "status": "confirmed", + "metamaskNetworkId": "3", + "txParams": { + "from": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "to": "0x3ae39e89dc7e736cce53091057a45bf44b1a566c", + "value": "0x0", + "gasPrice": "0x4a817c800", + "gas": "0x7b0d", + "nonce": "0x06", + "chainId": 3 + }, + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7", + "hash": "0x2c12c403aeb62a92bd5eabd3edcc38ab9e63bb0c93f706520bd2042894737ad1", + "retryCount": 5 + } + ], + "gasLimitSpecified": false, + "estimatedGas": "5209", + "nonceDetails": { + "blockNumber": "0x16b068", + "baseCount": 3, + "baseCountHex": "0x3", + "pendingCount": 3 + }, + "rawTx": "0xf864068504a817c800827b0d943ae39e89dc7e736cce53091057a45bf44b1a566c80802aa0d983a744f58179522b4bb75f6320dbcf0a699506f2470139282a2ad02e92554fa030d818c35e997ba5d004df65a0c4ebcb49d098ec7dc190d7287a72f9c96f89e7", + "hash": "0x2c12c403aeb62a92bd5eabd3edcc38ab9e63bb0c93f706520bd2042894737ad1", + "retryCount": 5 + } + ] + } + } +} \ No newline at end of file diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js index 57d7deccd..c84a374ae 100644 --- a/test/unit/tx-controller-test.js +++ b/test/unit/tx-controller-test.js @@ -47,7 +47,7 @@ describe('Transaction Controller', function () { metamaskNetworkId: currentNetworkId, txParams, } - txController._saveTxList([txMeta]) + txController.addTx(txMeta) stub = sinon.stub(txController, 'addUnapprovedTransaction').returns(Promise.resolve(txMeta)) }) @@ -279,9 +279,12 @@ describe('Transaction Controller', function () { it('replaces the tx with the same id', function () { txController.addTx({ id: '1', status: 'unapproved', metamaskNetworkId: currentNetworkId, txParams: {} }, noop) txController.addTx({ id: '2', status: 'confirmed', metamaskNetworkId: currentNetworkId, txParams: {} }, noop) - txController.updateTx({ id: '1', status: 'blah', hash: 'foo', metamaskNetworkId: currentNetworkId, txParams: {} }) - var result = txController.getTx('1') - assert.equal(result.hash, 'foo') + const tx1 = txController.getTx('1') + tx1.status = 'blah' + tx1.hash = 'foo' + txController.updateTx(tx1) + const savedResult = txController.getTx('1') + assert.equal(savedResult.hash, 'foo') }) it('updates gas price', function () { @@ -297,9 +300,9 @@ describe('Transaction Controller', function () { }, } - const updatedMeta = clone(txMeta) txController.addTx(txMeta) + const updatedMeta = txController.getTx('1') updatedMeta.txParams.gasPrice = desiredGasPrice txController.updateTx(updatedMeta) var result = txController.getTx('1') diff --git a/test/unit/tx-state-history-helper.js b/test/unit/tx-state-history-helper.js new file mode 100644 index 000000000..2ac91c39f --- /dev/null +++ b/test/unit/tx-state-history-helper.js @@ -0,0 +1,23 @@ +const assert = require('assert') +const txStateHistoryHelper = require('../../app/scripts/lib/tx-state-history-helper') +const testVault = require('../data/v17-long-history.json') + + +describe('history-differ', function () { + it('migrates history to diffs and can recover original values', function () { + testVault.data.TransactionController.transactions.forEach((tx, index) => { + const newHistory = txStateHistoryHelper.migrateFromSnapshotsToDiffs(tx.history) + newHistory.forEach((newEntry, index) => { + if (index === 0) { + assert.equal(Array.isArray(newEntry), false, 'initial history item IS NOT a json patch obj') + } else { + assert.equal(Array.isArray(newEntry), true, 'non-initial history entry IS a json patch obj') + } + const oldEntry = tx.history[index] + const historySubset = newHistory.slice(0, index + 1) + const reconstructedValue = txStateHistoryHelper.replayHistory(historySubset) + assert.deepEqual(oldEntry, reconstructedValue, 'was able to reconstruct old entry from diffs') + }) + }) + }) +}) -- cgit v1.2.3 From fec0f2ca5e4c2aabe657dfe0317365b06e7f665f Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 14 Aug 2017 19:15:09 -0700 Subject: tx controller - test - test tx state history in updateTx --- test/unit/tx-controller-test.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js index c84a374ae..38305f658 100644 --- a/test/unit/tx-controller-test.js +++ b/test/unit/tx-controller-test.js @@ -6,12 +6,15 @@ const clone = require('clone') const sinon = require('sinon') const TransactionController = require('../../app/scripts/controllers/transactions') const TxProvideUtils = require('../../app/scripts/lib/tx-utils') +const txStateHistoryHelper = require('../../app/scripts/lib/tx-state-history-helper') + const noop = () => true const currentNetworkId = 42 const otherNetworkId = 36 const privKey = new Buffer('8718b9618a37d1fc78c436511fc6df3c8258d3250635bba617f33003270ec03e', 'hex') const { createStubedProvider } = require('../stub/provider') + describe('Transaction Controller', function () { let txController, engine, provider, providerResultStub @@ -287,7 +290,7 @@ describe('Transaction Controller', function () { assert.equal(savedResult.hash, 'foo') }) - it('updates gas price', function () { + it('updates gas price and adds history items', function () { const originalGasPrice = '0x01' const desiredGasPrice = '0x02' @@ -300,13 +303,22 @@ describe('Transaction Controller', function () { }, } - txController.addTx(txMeta) - const updatedMeta = txController.getTx('1') - updatedMeta.txParams.gasPrice = desiredGasPrice - txController.updateTx(updatedMeta) - var result = txController.getTx('1') + const updatedTx = txController.getTx('1') + // verify tx was initialized correctly + assert.equal(result.history.length, 1, 'one history item (initial)') + assert.equal(Array.isArray(result.history[0]), false, 'first history item is initial state') + assert.deepEqual(result.history[0], txStateHistoryHelper.snapshotFromTxMeta(updatedTx), 'first history item is initial state') + // modify value and updateTx + updatedTx.txParams.gasPrice = desiredGasPrice + txController.updateTx(updatedTx) + // check updated value + const result = txController.getTx('1') assert.equal(result.txParams.gasPrice, desiredGasPrice, 'gas price updated') + // validate history was updated + assert.equal(result.history.length, 2, 'two history items (initial + diff)') + const expectedEntry = { op: 'replace', path: '/txParams/gasPrice', value: desiredGasPrice } + assert.deepEqual(result.history[1], [expectedEntry], 'two history items (initial + diff)') }) }) -- cgit v1.2.3 From 1af797b1b3a37d8fe00afbd0d84cb3349b8fd471 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 14 Aug 2017 19:15:36 -0700 Subject: tx controller - tx state history various small fixes --- test/unit/tx-state-history-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/tx-state-history-helper.js b/test/unit/tx-state-history-helper.js index 2ac91c39f..5bb6c9bee 100644 --- a/test/unit/tx-state-history-helper.js +++ b/test/unit/tx-state-history-helper.js @@ -3,7 +3,7 @@ const txStateHistoryHelper = require('../../app/scripts/lib/tx-state-history-hel const testVault = require('../data/v17-long-history.json') -describe('history-differ', function () { +describe('tx-state-history-helper', function () { it('migrates history to diffs and can recover original values', function () { testVault.data.TransactionController.transactions.forEach((tx, index) => { const newHistory = txStateHistoryHelper.migrateFromSnapshotsToDiffs(tx.history) -- cgit v1.2.3 From a9e5564e8d8485741fd09efd994493fb1d8af614 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 14 Aug 2017 19:34:22 -0700 Subject: tx controller - test - fix typo from moved test --- test/unit/tx-controller-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/unit/tx-controller-test.js b/test/unit/tx-controller-test.js index 38305f658..7bb193242 100644 --- a/test/unit/tx-controller-test.js +++ b/test/unit/tx-controller-test.js @@ -306,9 +306,9 @@ describe('Transaction Controller', function () { txController.addTx(txMeta) const updatedTx = txController.getTx('1') // verify tx was initialized correctly - assert.equal(result.history.length, 1, 'one history item (initial)') - assert.equal(Array.isArray(result.history[0]), false, 'first history item is initial state') - assert.deepEqual(result.history[0], txStateHistoryHelper.snapshotFromTxMeta(updatedTx), 'first history item is initial state') + assert.equal(updatedTx.history.length, 1, 'one history item (initial)') + assert.equal(Array.isArray(updatedTx.history[0]), false, 'first history item is initial state') + assert.deepEqual(updatedTx.history[0], txStateHistoryHelper.snapshotFromTxMeta(updatedTx), 'first history item is initial state') // modify value and updateTx updatedTx.txParams.gasPrice = desiredGasPrice txController.updateTx(updatedTx) -- cgit v1.2.3 From f684b53b69116ef6b9e2b0449956d8f59df56253 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 16 Aug 2017 17:17:05 -0700 Subject: Remove dead tests --- test/unit/actions/tx_test.js | 87 +------------------------------------------- 1 file changed, 1 insertion(+), 86 deletions(-) (limited to 'test') diff --git a/test/unit/actions/tx_test.js b/test/unit/actions/tx_test.js index 67c72e9a5..ea6dfda6a 100644 --- a/test/unit/actions/tx_test.js +++ b/test/unit/actions/tx_test.js @@ -53,7 +53,7 @@ describe('tx confirmation screen', function () { result = reducers(initialState, action) done() }) - + }) it('should transition to the account detail view', function () { @@ -65,91 +65,6 @@ describe('tx confirmation screen', function () { assert.equal(count, 0) }) }) - - describe('sendTx', function () { - var result - - describe('when there is an error', function () { - before(function (done) { - actions._setBackgroundConnection({ - approveTransaction (txId, cb) { cb({message: 'An error!'}) }, - }) - - actions.sendTx({id: firstTxId})(function (action) { - result = reducers(initialState, action) - done() - }) - }) - - it('should stay on the page', function () { - assert.equal(result.appState.currentView.name, 'confTx') - }) - - it('should set errorMessage on the currentView', function () { - assert(result.appState.currentView.errorMessage) - }) - }) - - describe('when there is success', function () { - it('should complete tx and go home', function () { - actions._setBackgroundConnection({ - approveTransaction (txId, cb) { cb() }, - }) - - var dispatchExpect = sinon.mock() - dispatchExpect.twice() - - actions.sendTx({id: firstTxId})(dispatchExpect) - }) - }) - }) - - describe('when there are two pending txs', function () { - var firstTxId = 1457634084250832 - var result, initialState - before(function (done) { - initialState = { - appState: { - currentView: { - name: 'confTx', - }, - }, - metamask: { - unapprovedTxs: { - '1457634084250832': { - id: firstTxId, - status: 'unconfirmed', - time: 1457634084250, - }, - '1457634084250833': { - id: 1457634084250833, - status: 'unconfirmed', - time: 1457634084255, - }, - }, - }, - } - freeze(initialState) - - // Mocking a background connection: - actions._setBackgroundConnection({ - approveTransaction (firstTxId, cb) { cb() }, - }) - - actions.sendTx({id: firstTxId})(function (action) { - result = reducers(initialState, action) - }) - done() - }) - - it('should stay on the confTx view', function () { - assert.equal(result.appState.currentView.name, 'confTx') - }) - - it('should transition to the first tx', function () { - assert.equal(result.appState.currentView.context, 0) - }) - }) }) }) -- cgit v1.2.3 From bf8a62eb39aac454c1f23e549078ce5f4b8a2d2a Mon Sep 17 00:00:00 2001 From: frankiebee Date: Fri, 18 Aug 2017 13:53:18 -0700 Subject: add test for using localNonce --- test/unit/nonce-tracker-test.js | 46 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 36025a360..2171d859d 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -2,24 +2,53 @@ const assert = require('assert') const NonceTracker = require('../../app/scripts/lib/nonce-tracker') describe('Nonce Tracker', function () { - let nonceTracker, provider, getPendingTransactions, pendingTxs - + let nonceTracker, provider + let getPendingTransactions, pendingTxs + let getConfirmedTransactions, confirmedTxs + let providerResultStub = {} beforeEach(function () { pendingTxs = [{ 'status': 'submitted', + 'txParams': { + 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', + 'gas': '0x30d40', + 'value': '0x0', + 'nonce': '0x3', + }, + }] + confirmedTxs = [{ + 'status': 'confirmed', 'txParams': { 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', 'gas': '0x30d40', 'value': '0x0', 'nonce': '0x0', }, + }, { + 'status': 'confirmed', + 'txParams': { + 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', + 'gas': '0x30d40', + 'value': '0x0', + 'nonce': '0x1', + }, + }, { + 'status': 'confirmed', + 'txParams': { + 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', + 'gas': '0x30d40', + 'value': '0x0', + 'nonce': '0x2', + }, }] getPendingTransactions = () => pendingTxs + getConfirmedTransactions = () => confirmedTxs + providerResultStub.result = '0x3' provider = { - sendAsync: (_, cb) => { cb(undefined, {result: '0x0'}) }, + sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, _blockTracker: { getCurrentBlock: () => '0x11b568', }, @@ -27,6 +56,7 @@ describe('Nonce Tracker', function () { nonceTracker = new NonceTracker({ provider, getPendingTransactions, + getConfirmedTransactions, }) }) @@ -34,7 +64,15 @@ describe('Nonce Tracker', function () { it('should work', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '1', 'nonce should be 1') + assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') + await nonceLock.releaseLock() + }) + + it('should use localNonce if network returns a nonce lower then a confirmed tx in state', async function () { + this.timeout(15000) + providerResultStub.result = '0x1' + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') await nonceLock.releaseLock() }) }) -- cgit v1.2.3 From c76194d7c315f9fb8e536328f97a2ac2dc411097 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Aug 2017 11:35:18 -0700 Subject: Move mock txs to tx mocking class --- test/lib/mock-tx-gen.js | 40 ++++++++++++++++++++++++++++++++++++++ test/unit/nonce-tracker-test.js | 43 ++++++++--------------------------------- 2 files changed, 48 insertions(+), 35 deletions(-) create mode 100644 test/lib/mock-tx-gen.js (limited to 'test') diff --git a/test/lib/mock-tx-gen.js b/test/lib/mock-tx-gen.js new file mode 100644 index 000000000..7aea09c59 --- /dev/null +++ b/test/lib/mock-tx-gen.js @@ -0,0 +1,40 @@ +const extend = require('xtend') +const BN = require('ethereumjs-util').BN +const template = { + 'status': 'submitted', + 'txParams': { + 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', + 'gas': '0x30d40', + 'value': '0x0', + 'nonce': '0x3', + }, +} + +class TxGenerator { + + constructor () { + this.txs = [] + } + + generate (tx = {}, opts = {}) { + let { count, fromNonce } = opts + let nonce = fromNonce || this.txs.length + let txs = [] + for (let i = 0; i < count; i++) { + txs.push(extend(template, { + txParams: { + nonce: hexify(nonce++), + } + }, tx)) + } + this.txs = this.txs.concat(txs) + return txs + } + +} + +function hexify (number) { + return '0x' + (new BN(number)).toString(16) +} + +module.exports = TxGenerator diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 2171d859d..225cfbae5 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -1,5 +1,6 @@ const assert = require('assert') const NonceTracker = require('../../app/scripts/lib/nonce-tracker') +const MockTxGen = require('../lib/mock-tx-gen') describe('Nonce Tracker', function () { let nonceTracker, provider @@ -8,41 +9,9 @@ describe('Nonce Tracker', function () { let providerResultStub = {} beforeEach(function () { - pendingTxs = [{ - 'status': 'submitted', - 'txParams': { - 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', - 'gas': '0x30d40', - 'value': '0x0', - 'nonce': '0x3', - }, - }] - confirmedTxs = [{ - 'status': 'confirmed', - 'txParams': { - 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', - 'gas': '0x30d40', - 'value': '0x0', - 'nonce': '0x0', - }, - }, { - 'status': 'confirmed', - 'txParams': { - 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', - 'gas': '0x30d40', - 'value': '0x0', - 'nonce': '0x1', - }, - }, { - 'status': 'confirmed', - 'txParams': { - 'from': '0x7d3517b0d011698406d6e0aed8453f0be2697926', - 'gas': '0x30d40', - 'value': '0x0', - 'nonce': '0x2', - }, - }] - + const txGen = new MockTxGen() + confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) + pendingTxs = txGen.generate({ status: 'pending' }, { count: 1 }) getPendingTransactions = () => pendingTxs getConfirmedTransactions = () => confirmedTxs @@ -68,6 +37,10 @@ describe('Nonce Tracker', function () { await nonceLock.releaseLock() }) + it('should return 0 if there are no previous transactions', async function () { + + }) + it('should use localNonce if network returns a nonce lower then a confirmed tx in state', async function () { this.timeout(15000) providerResultStub.result = '0x1' -- cgit v1.2.3 From f13c637b23135dcf9ba1b4fbd82da1422e8ea326 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Aug 2017 11:37:39 -0700 Subject: Confine mock strategy to describe block --- test/unit/nonce-tracker-test.js | 74 ++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 35 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 225cfbae5..5b8318f59 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -8,45 +8,49 @@ describe('Nonce Tracker', function () { let getConfirmedTransactions, confirmedTxs let providerResultStub = {} - beforeEach(function () { - const txGen = new MockTxGen() - confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) - pendingTxs = txGen.generate({ status: 'pending' }, { count: 1 }) - - getPendingTransactions = () => pendingTxs - getConfirmedTransactions = () => confirmedTxs - providerResultStub.result = '0x3' - provider = { - sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, - _blockTracker: { - getCurrentBlock: () => '0x11b568', - }, - } - nonceTracker = new NonceTracker({ - provider, - getPendingTransactions, - getConfirmedTransactions, - }) - }) - describe('#getNonceLock', function () { - it('should work', async function () { - this.timeout(15000) - const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') - await nonceLock.releaseLock() - }) - it('should return 0 if there are no previous transactions', async function () { + describe('with 3 confirmed and 1 pending', function () { + beforeEach(function () { + const txGen = new MockTxGen() + confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) + pendingTxs = txGen.generate({ status: 'pending' }, { count: 1 }) - }) + getPendingTransactions = () => pendingTxs + getConfirmedTransactions = () => confirmedTxs + providerResultStub.result = '0x3' + provider = { + sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, + _blockTracker: { + getCurrentBlock: () => '0x11b568', + }, + } + nonceTracker = new NonceTracker({ + provider, + getPendingTransactions, + getConfirmedTransactions, + }) + }) + + it('should work', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') + await nonceLock.releaseLock() + }) + + it('should return 0 if there are no previous transactions', async function () { + + }) + + it('should use localNonce if network returns a nonce lower then a confirmed tx in state', async function () { + this.timeout(15000) + providerResultStub.result = '0x1' + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') + await nonceLock.releaseLock() + }) - it('should use localNonce if network returns a nonce lower then a confirmed tx in state', async function () { - this.timeout(15000) - providerResultStub.result = '0x1' - const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') - await nonceLock.releaseLock() }) }) }) -- cgit v1.2.3 From 306249e89e84db3d3eab9b454b8ef9daad4ac035 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Aug 2017 11:39:22 -0700 Subject: Add test for no previous txs --- test/unit/nonce-tracker-test.js | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 5b8318f59..617d9b56c 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -39,10 +39,6 @@ describe('Nonce Tracker', function () { await nonceLock.releaseLock() }) - it('should return 0 if there are no previous transactions', async function () { - - }) - it('should use localNonce if network returns a nonce lower then a confirmed tx in state', async function () { this.timeout(15000) providerResultStub.result = '0x1' @@ -50,7 +46,32 @@ describe('Nonce Tracker', function () { assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') await nonceLock.releaseLock() }) + }) + + describe('with no previous txs', function () { + beforeEach(function () { + getPendingTransactions = () => [] + getConfirmedTransactions = () => [] + providerResultStub.result = '0x0' + provider = { + sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, + _blockTracker: { + getCurrentBlock: () => '0x11b568', + }, + } + nonceTracker = new NonceTracker({ + provider, + getPendingTransactions, + getConfirmedTransactions, + }) + }) + it('should return 0', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '0', 'nonce should be 0') + await nonceLock.releaseLock() + }) }) }) }) -- cgit v1.2.3 From 440101f2b561a92e81545140f0232b94af143831 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Aug 2017 11:52:41 -0700 Subject: Add new assertions and de-duplicate nonce tracker generation --- test/unit/nonce-tracker-test.js | 102 ++++++++++++++++++++++++++++------------ 1 file changed, 73 insertions(+), 29 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 617d9b56c..3ed0eda9b 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -15,21 +15,7 @@ describe('Nonce Tracker', function () { const txGen = new MockTxGen() confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) pendingTxs = txGen.generate({ status: 'pending' }, { count: 1 }) - - getPendingTransactions = () => pendingTxs - getConfirmedTransactions = () => confirmedTxs - providerResultStub.result = '0x3' - provider = { - sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, - _blockTracker: { - getCurrentBlock: () => '0x11b568', - }, - } - nonceTracker = new NonceTracker({ - provider, - getPendingTransactions, - getConfirmedTransactions, - }) + nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs) }) it('should work', async function () { @@ -50,20 +36,7 @@ describe('Nonce Tracker', function () { describe('with no previous txs', function () { beforeEach(function () { - getPendingTransactions = () => [] - getConfirmedTransactions = () => [] - providerResultStub.result = '0x0' - provider = { - sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, - _blockTracker: { - getCurrentBlock: () => '0x11b568', - }, - } - nonceTracker = new NonceTracker({ - provider, - getPendingTransactions, - getConfirmedTransactions, - }) + nonceTracker = generateNonceTrackerWith([], []) }) it('should return 0', async function () { @@ -73,5 +46,76 @@ describe('Nonce Tracker', function () { await nonceLock.releaseLock() }) }) + + describe('with multiple previous txs with same nonce', function () { + beforeEach(function () { + const txGen = new MockTxGen() + confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 1 }) + pendingTxs = txGen.generate({ + status: 'pending', + txParams: { nonce: '0x01' }, + }, { count: 5 }) + + nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs) + }) + + it('should return nonce after those', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + console.dir(nonceLock.nextNonce) + assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') + await nonceLock.releaseLock() + }) + }) + + describe('when local confirmed count is higher than network nonce', function () { + beforeEach(function () { + const txGen = new MockTxGen() + confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 2 }) + nonceTracker = generateNonceTrackerWith([], confirmedTxs) + }) + + it('should return nonce after those', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + console.dir(nonceLock.nextNonce) + assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') + await nonceLock.releaseLock() + }) + }) + + describe('when local pending count is higher than other metrics', function () { + beforeEach(function () { + const txGen = new MockTxGen() + pendingTxs = txGen.generate({ status: 'pending' }, { count: 2 }) + nonceTracker = generateNonceTrackerWith(pendingTxs, []) + }) + + it('should return nonce after those', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + console.dir(nonceLock.nextNonce) + assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') + await nonceLock.releaseLock() + }) + }) }) }) + +function generateNonceTrackerWith(pending, confirmed) { + const getPendingTransactions = () => pending + const getConfirmedTransactions = () => confirmed + providerResultStub.result = '0x0' + const provider = { + sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, + _blockTracker: { + getCurrentBlock: () => '0x11b568', + }, + } + return new NonceTracker({ + provider, + getPendingTransactions, + getConfirmedTransactions, + }) +} + -- cgit v1.2.3 From 0f36e0e6da4027ea4b41510e9a81939d71b11586 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Aug 2017 11:57:42 -0700 Subject: Fix test --- test/unit/nonce-tracker-test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 3ed0eda9b..e8fa73b55 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -1,12 +1,12 @@ const assert = require('assert') const NonceTracker = require('../../app/scripts/lib/nonce-tracker') const MockTxGen = require('../lib/mock-tx-gen') +let providerResultStub = {} describe('Nonce Tracker', function () { let nonceTracker, provider let getPendingTransactions, pendingTxs let getConfirmedTransactions, confirmedTxs - let providerResultStub = {} describe('#getNonceLock', function () { @@ -15,7 +15,8 @@ describe('Nonce Tracker', function () { const txGen = new MockTxGen() confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) pendingTxs = txGen.generate({ status: 'pending' }, { count: 1 }) - nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs) + console.dir(txGen.txs) + nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs, '0x1') }) it('should work', async function () { @@ -27,7 +28,6 @@ describe('Nonce Tracker', function () { it('should use localNonce if network returns a nonce lower then a confirmed tx in state', async function () { this.timeout(15000) - providerResultStub.result = '0x1' const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') await nonceLock.releaseLock() @@ -102,10 +102,10 @@ describe('Nonce Tracker', function () { }) }) -function generateNonceTrackerWith(pending, confirmed) { +function generateNonceTrackerWith(pending, confirmed, providerStub = '0x0') { const getPendingTransactions = () => pending const getConfirmedTransactions = () => confirmed - providerResultStub.result = '0x0' + providerResultStub.result = providerStub const provider = { sendAsync: (_, cb) => { cb(undefined, providerResultStub) }, _blockTracker: { -- cgit v1.2.3 From bb24f07b1759eb46fa4e4f733c348f1b87521eb6 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Aug 2017 11:59:51 -0700 Subject: When network nonce is highest, it should be used. --- test/unit/nonce-tracker-test.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index e8fa73b55..78fdee209 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -15,7 +15,6 @@ describe('Nonce Tracker', function () { const txGen = new MockTxGen() confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) pendingTxs = txGen.generate({ status: 'pending' }, { count: 1 }) - console.dir(txGen.txs) nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs, '0x1') }) @@ -62,7 +61,6 @@ describe('Nonce Tracker', function () { it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - console.dir(nonceLock.nextNonce) assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') await nonceLock.releaseLock() }) @@ -78,7 +76,6 @@ describe('Nonce Tracker', function () { it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - console.dir(nonceLock.nextNonce) assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') await nonceLock.releaseLock() }) @@ -94,11 +91,25 @@ describe('Nonce Tracker', function () { it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - console.dir(nonceLock.nextNonce) assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') await nonceLock.releaseLock() }) }) + + describe('when provider nonce is higher than other metrics', function () { + beforeEach(function () { + const txGen = new MockTxGen() + pendingTxs = txGen.generate({ status: 'pending' }, { count: 2 }) + nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x05') + }) + + it('should return nonce after those', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '6', 'nonce should be 6') + await nonceLock.releaseLock() + }) + }) }) }) -- cgit v1.2.3 From e43db262d8aa3fb725bc8e05d2ecbf38de32688a Mon Sep 17 00:00:00 2001 From: frankiebee Date: Mon, 21 Aug 2017 16:44:29 -0700 Subject: fix test --- test/unit/nonce-tracker-test.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 78fdee209..9a819b146 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -14,7 +14,7 @@ describe('Nonce Tracker', function () { beforeEach(function () { const txGen = new MockTxGen() confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) - pendingTxs = txGen.generate({ status: 'pending' }, { count: 1 }) + pendingTxs = txGen.generate({ status: 'submitted' }, { count: 1 }) nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs, '0x1') }) @@ -51,7 +51,7 @@ describe('Nonce Tracker', function () { const txGen = new MockTxGen() confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 1 }) pendingTxs = txGen.generate({ - status: 'pending', + status: 'submitted', txParams: { nonce: '0x01' }, }, { count: 5 }) @@ -61,7 +61,7 @@ describe('Nonce Tracker', function () { it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') + assert.equal(nonceLock.nextNonce, '2', `nonce should be 2 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) @@ -76,7 +76,7 @@ describe('Nonce Tracker', function () { it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') + assert.equal(nonceLock.nextNonce, '2', `nonce should be 2 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) @@ -84,14 +84,14 @@ describe('Nonce Tracker', function () { describe('when local pending count is higher than other metrics', function () { beforeEach(function () { const txGen = new MockTxGen() - pendingTxs = txGen.generate({ status: 'pending' }, { count: 2 }) + pendingTxs = txGen.generate({ status: 'submitted' }, { count: 2 }) nonceTracker = generateNonceTrackerWith(pendingTxs, []) }) it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '2', 'nonce should be 2') + assert.equal(nonceLock.nextNonce, '2', `nonce should be 2 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) @@ -99,21 +99,21 @@ describe('Nonce Tracker', function () { describe('when provider nonce is higher than other metrics', function () { beforeEach(function () { const txGen = new MockTxGen() - pendingTxs = txGen.generate({ status: 'pending' }, { count: 2 }) + pendingTxs = txGen.generate({ status: 'submitted' }, { count: 2 }) nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x05') }) it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '6', 'nonce should be 6') + assert.equal(nonceLock.nextNonce, '5', `nonce should be 5 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) }) }) -function generateNonceTrackerWith(pending, confirmed, providerStub = '0x0') { +function generateNonceTrackerWith (pending, confirmed, providerStub = '0x0') { const getPendingTransactions = () => pending const getConfirmedTransactions = () => confirmed providerResultStub.result = providerStub -- cgit v1.2.3 From 38ba31bbe01785761c03f5d7d781939104d34f37 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 21 Aug 2017 17:29:31 -0700 Subject: Refer to pending nonces, not just their count --- test/unit/nonce-tracker-test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 9a819b146..11f99751c 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -110,6 +110,21 @@ describe('Nonce Tracker', function () { await nonceLock.releaseLock() }) }) + + describe('when there are some pending nonces below the remote one and some over.', function () { + beforeEach(function () { + const txGen = new MockTxGen() + pendingTxs = txGen.generate({ status: 'submitted' }, { count: 5 }) + nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x03') + }) + + it('should return nonce after those', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '5', `nonce should be 5 got ${nonceLock.nextNonce}`) + await nonceLock.releaseLock() + }) + }) }) }) -- cgit v1.2.3 From 5feda433607fc5a762e1e0843598bacda9d11ca9 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 23 Aug 2017 19:34:37 -0700 Subject: Add failing test for newly identified error state Reproduces #1966 --- test/unit/nonce-tracker-test.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 11f99751c..5b0732d44 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -125,6 +125,23 @@ describe('Nonce Tracker', function () { await nonceLock.releaseLock() }) }) + + describe('when there are pending nonces non sequentially over the network nonce.', function () { + beforeEach(function () { + const txGen = new MockTxGen() + txGen.generate({ status: 'submitted' }, { count: 5 }) + // 5 over that number + pendingTxs = txGen.generate({ status: 'submitted' }, { count: 5 }) + nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x00') + }) + + it('should return nonce after network nonce', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '0', `nonce should be 0 got ${nonceLock.nextNonce}`) + await nonceLock.releaseLock() + }) + }) }) }) -- cgit v1.2.3 From 221575a191a0a8b8c4c17465a0530561e1905297 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 23 Aug 2017 20:04:03 -0700 Subject: Fix new test, break an older maybe wrong one --- test/unit/nonce-tracker-test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 5b0732d44..c5a71d6c8 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -18,10 +18,10 @@ describe('Nonce Tracker', function () { nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs, '0x1') }) - it('should work', async function () { + it('should return 4', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '4', 'nonce should be 4') + assert.equal(nonceLock.nextNonce, '4', `nonce should be 4 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) @@ -41,7 +41,7 @@ describe('Nonce Tracker', function () { it('should return 0', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '0', 'nonce should be 0') + assert.equal(nonceLock.nextNonce, '0', `nonce should be 0 returned ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) -- cgit v1.2.3 From 855f4eeacbcf7b3e056cf7956edea2c84fa256d5 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 23 Aug 2017 20:31:03 -0700 Subject: Pass nonce tests --- test/unit/nonce-tracker-test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index c5a71d6c8..758bf9eb6 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -55,7 +55,7 @@ describe('Nonce Tracker', function () { txParams: { nonce: '0x01' }, }, { count: 5 }) - nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs) + nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs, '0x0') }) it('should return nonce after those', async function () { @@ -69,14 +69,14 @@ describe('Nonce Tracker', function () { describe('when local confirmed count is higher than network nonce', function () { beforeEach(function () { const txGen = new MockTxGen() - confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 2 }) - nonceTracker = generateNonceTrackerWith([], confirmedTxs) + confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 3 }) + nonceTracker = generateNonceTrackerWith([], confirmedTxs, '0x1') }) it('should return nonce after those', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '2', `nonce should be 2 got ${nonceLock.nextNonce}`) + assert.equal(nonceLock.nextNonce, '3', `nonce should be 3 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) -- cgit v1.2.3 From dae7c632d6b7bed74abbe6bbc7b6b43deb2f2f0d Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 23 Aug 2017 21:01:42 -0700 Subject: Add mysterious failing test --- test/unit/nonce-tracker-test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 758bf9eb6..5f247b46b 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -142,6 +142,26 @@ describe('Nonce Tracker', function () { await nonceLock.releaseLock() }) }) + + describe('A normal usage condition.', function () { + beforeEach(function () { + const txGen = new MockTxGen() + const confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 10 }) + const pendingTxs = txGen.generate({ + status: 'submitted', + nonce: 100, + }, { count: 1 }) + // 0x32 is 50 in hex: + nonceTracker = generateNonceTrackerWith(pendingTxs, confirmedTxs, '0x32') + }) + + it('should return nonce after network nonce', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '10', `nonce should be 10 got ${nonceLock.nextNonce}`) + await nonceLock.releaseLock() + }) + }) }) }) -- cgit v1.2.3 From e057c37b337f34556af1734ceb44e7a4d9a7b08c Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 23 Aug 2017 21:03:29 -0700 Subject: Corrected test constraints --- test/unit/nonce-tracker-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 5f247b46b..3312a3bd0 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -143,7 +143,7 @@ describe('Nonce Tracker', function () { }) }) - describe('A normal usage condition.', function () { + describe('When all three return different values', function () { beforeEach(function () { const txGen = new MockTxGen() const confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 10 }) @@ -158,7 +158,7 @@ describe('Nonce Tracker', function () { it('should return nonce after network nonce', async function () { this.timeout(15000) const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') - assert.equal(nonceLock.nextNonce, '10', `nonce should be 10 got ${nonceLock.nextNonce}`) + assert.equal(nonceLock.nextNonce, '50', `nonce should be 50 got ${nonceLock.nextNonce}`) await nonceLock.releaseLock() }) }) -- cgit v1.2.3 From b97a65e1d1e421a09bc219167de189e0a6d2e340 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Mon, 28 Aug 2017 11:40:28 -0700 Subject: Add some tests to tx-state-history-helper --- test/unit/tx-state-history-helper-test.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/unit/tx-state-history-helper-test.js (limited to 'test') diff --git a/test/unit/tx-state-history-helper-test.js b/test/unit/tx-state-history-helper-test.js new file mode 100644 index 000000000..90cb10713 --- /dev/null +++ b/test/unit/tx-state-history-helper-test.js @@ -0,0 +1,26 @@ +const assert = require('assert') +const clone = require('clone') +const txStateHistoryHelper = require('../../app/scripts/lib/tx-state-history-helper') + +describe('deepCloneFromTxMeta', function () { + it('should clone deep', function () { + const input = { + foo: { + bar: { + bam: 'baz' + } + } + } + const output = txStateHistoryHelper.snapshotFromTxMeta(input) + assert('foo' in output, 'has a foo key') + assert('bar' in output.foo, 'has a bar key') + assert('bam' in output.foo.bar, 'has a bar key') + assert.equal(output.foo.bar.bam, 'baz', 'has a baz value') + }) + + it('should remove the history key', function () { + const input = { foo: 'bar', history: 'remembered' } + const output = txStateHistoryHelper.snapshotFromTxMeta(input) + assert(typeof output.history, 'undefined', 'should remove history') + }) +}) -- cgit v1.2.3 From 2117490d41a31eeb2d39383bfc5ae7751f445420 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 29 Aug 2017 11:36:53 -0700 Subject: Add test for trying to reproduce faq#67 Failed to reproduce this issue with the same inputs. --- test/unit/nonce-tracker-test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') diff --git a/test/unit/nonce-tracker-test.js b/test/unit/nonce-tracker-test.js index 3312a3bd0..8970cf84d 100644 --- a/test/unit/nonce-tracker-test.js +++ b/test/unit/nonce-tracker-test.js @@ -162,6 +162,25 @@ describe('Nonce Tracker', function () { await nonceLock.releaseLock() }) }) + + describe('Faq issue 67', function () { + beforeEach(function () { + const txGen = new MockTxGen() + const confirmedTxs = txGen.generate({ status: 'confirmed' }, { count: 64 }) + const pendingTxs = txGen.generate({ + status: 'submitted', + }, { count: 10 }) + // 0x40 is 64 in hex: + nonceTracker = generateNonceTrackerWith(pendingTxs, [], '0x40') + }) + + it('should return nonce after network nonce', async function () { + this.timeout(15000) + const nonceLock = await nonceTracker.getNonceLock('0x7d3517b0d011698406d6e0aed8453f0be2697926') + assert.equal(nonceLock.nextNonce, '74', `nonce should be 74 got ${nonceLock.nextNonce}`) + await nonceLock.releaseLock() + }) + }) }) }) -- cgit v1.2.3 From 36a44ef61fa0475b0e3738a35e8e1b41cda5f208 Mon Sep 17 00:00:00 2001 From: tmashuang Date: Wed, 6 Sep 2017 11:04:17 -0700 Subject: Update mock-store dependency --- test/lib/mock-store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/lib/mock-store.js b/test/lib/mock-store.js index 0d50e2d9c..8af8f6d23 100644 --- a/test/lib/mock-store.js +++ b/test/lib/mock-store.js @@ -1,7 +1,7 @@ const createStore = require('redux').createStore const applyMiddleware = require('redux').applyMiddleware -const thunkMiddleware = require('redux-thunk') -const createLogger = require('redux-logger') +const thunkMiddleware = require('redux-thunk').default +const createLogger = require('redux-logger').createLogger const rootReducer = function () {} module.exports = configureStore -- cgit v1.2.3 From a6d49a49eaaeee73d8b417188823393adf65794e Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 11 Sep 2017 15:48:50 -0700 Subject: test - integration - use async fn for error catching --- test/integration/lib/first-time.js | 181 ++++++++++++++++++------------------- 1 file changed, 87 insertions(+), 94 deletions(-) (limited to 'test') diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index 0e4b802da..cc56b3704 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -2,125 +2,118 @@ const PASSWORD = 'password123' QUnit.module('first time usage') -QUnit.test('render init screen', function (assert) { - var done = assert.async() - let app - - wait().then(function() { - app = $('iframe').contents().find('#app-content .mock-app-root') - - const recurseNotices = function () { - let button = app.find('button') - if (button.html() === 'Accept') { - let termsPage = app.find('.markdown')[0] - termsPage.scrollTop = termsPage.scrollHeight - return wait().then(() => { - button.click() - return wait() - }).then(() => { - return recurseNotices() - }) - } else { - return wait() - } +QUnit.test('render init screen', (assert) => { + const done = assert.async() + runFirstTimeUsageTest(assert).then(done).catch((err) => { + assert.notOk(err, 'Should not error') + done() + }) +}) + +async function runFirstTimeUsageTest(assert, done) { + await wait() + + const app = $('iframe').contents().find('#app-content .mock-app-root') + + const recurseNotices = async () => { + const button = app.find('button') + if (button.html() === 'Accept') { + const termsPage = app.find('.markdown')[0] + termsPage.scrollTop = termsPage.scrollHeight + await wait() + button.click() + await wait() + await recurseNotices() + } else { + await wait() } - return recurseNotices() - }).then(function() { - // Scroll through terms - var title = app.find('h1').text() - assert.equal(title, 'MetaMask', 'title screen') + } - // enter password - var pwBox = app.find('#password-box')[0] - var confBox = app.find('#password-box-confirm')[0] - pwBox.value = PASSWORD - confBox.value = PASSWORD + await recurseNotices() - return wait() - }).then(function() { + // Scroll through terms + const title = app.find('h1').text() + assert.equal(title, 'MetaMask', 'title screen') - // create vault - var createButton = app.find('button.primary')[0] - createButton.click() + // enter password + const pwBox = app.find('#password-box')[0] + const confBox = app.find('#password-box-confirm')[0] + pwBox.value = PASSWORD + confBox.value = PASSWORD - return wait(1500) - }).then(function() { + await wait() - var created = app.find('h3')[0] - assert.equal(created.textContent, 'Vault Created', 'Vault created screen') + // create vault + const createButton = app.find('button.primary')[0] + createButton.click() - // Agree button - var button = app.find('button')[0] - assert.ok(button, 'button present') - button.click() + await wait(1500) - return wait(1000) - }).then(function() { + const created = app.find('h3')[0] + assert.equal(created.textContent, 'Vault Created', 'Vault created screen') - var detail = app.find('.account-detail-section')[0] - assert.ok(detail, 'Account detail section loaded.') + // Agree button + const button = app.find('button')[0] + assert.ok(button, 'button present') + button.click() - var sandwich = app.find('.sandwich-expando')[0] - sandwich.click() + await wait(1000) - return wait() - }).then(function() { + const detail = app.find('.account-detail-section')[0] + assert.ok(detail, 'Account detail section loaded.') - var sandwich = app.find('.menu-droppo')[0] - var children = sandwich.children - var lock = children[children.length - 2] - assert.ok(lock, 'Lock menu item found') - lock.click() + const sandwich = app.find('.sandwich-expando')[0] + sandwich.click() - return wait(1000) - }).then(function() { + await wait() - var pwBox = app.find('#password-box')[0] - pwBox.value = PASSWORD + const menu = app.find('.menu-droppo')[0] + const children = menu.children + const lock = children[children.length - 2] + assert.ok(lock, 'Lock menu item found') + lock.click() - var createButton = app.find('button.primary')[0] - createButton.click() + await wait(1000) - return wait(1000) - }).then(function() { + const pwBox2 = app.find('#password-box')[0] + pwBox2.value = PASSWORD - var detail = app.find('.account-detail-section')[0] - assert.ok(detail, 'Account detail section loaded again.') + const createButton2 = app.find('button.primary')[0] + createButton2.click() - return wait() - }).then(function (){ + await wait(1000) - var qrButton = app.find('.fa.fa-ellipsis-h')[0] // open account settings dropdown - qrButton.click() + const detail2 = app.find('.account-detail-section')[0] + assert.ok(detail2, 'Account detail section loaded again.') - return wait(1000) - }).then(function (){ + await wait() - var qrButton = app.find('.dropdown-menu-item')[1] // qr code item - qrButton.click() + // open account settings dropdown + const qrButton = app.find('.fa.fa-ellipsis-h')[0] + qrButton.click() - return wait(1000) - }).then(function (){ + await wait(1000) - var qrHeader = app.find('.qr-header')[0] - var qrContainer = app.find('#qr-container')[0] - assert.equal(qrHeader.textContent, 'Account 1', 'Should show account label.') - assert.ok(qrContainer, 'QR Container found') + // qr code item + const qrButton2 = app.find('.dropdown-menu-item')[1] + qrButton2.click() - return wait() - }).then(function (){ + await wait(1000) - var networkMenu = app.find('.network-indicator')[0] - networkMenu.click() + const qrHeader = app.find('.qr-header')[0] + const qrContainer = app.find('#qr-container')[0] + assert.equal(qrHeader.textContent, 'Account 1', 'Should show account label.') + assert.ok(qrContainer, 'QR Container found') - return wait() - }).then(function (){ + await wait() - var networkMenu = app.find('.network-indicator')[0] - var children = networkMenu.children - children.length[3] - assert.ok(children, 'All network options present') + const networkMenu = app.find('.network-indicator')[0] + networkMenu.click() - done() - }) -}) + await wait() + + const networkMenu2 = app.find('.network-indicator')[0] + const children2 = networkMenu2.children + children2.length[3] + assert.ok(children2, 'All network options present') +} \ No newline at end of file -- cgit v1.2.3 From 19d6618c04196f392a455823d1929025d40564fa Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 11 Sep 2017 16:21:58 -0700 Subject: test - integration - build - use pump + log bundling information --- test/integration/index.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/integration/index.js b/test/integration/index.js index e089fc39b..8dc8a408f 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -1,5 +1,6 @@ const fs = require('fs') const path = require('path') +const pump = require('pump') const browserify = require('browserify') const tests = fs.readdirSync(path.join(__dirname, 'lib')) const bundlePath = path.join(__dirname, 'bundle.js') @@ -9,11 +10,16 @@ const b = browserify() const writeStream = fs.createWriteStream(bundlePath) tests.forEach(function (fileName) { - b.add(path.join(__dirname, 'lib', fileName)) + const filePath = path.join(__dirname, 'lib', fileName) + console.log(`bundling test "${filePath}"`) + b.add(filePath) }) -b.bundle() -.pipe(writeStream) -.on('error', (err) => { - throw err -}) +pump( + b.bundle(), + writeStream, + (err) => { + if (err) throw err + console.log('bundle completed.') + } +) \ No newline at end of file -- cgit v1.2.3 From d4a41e0277bb2a8905b546165a3b0de62d3407cb Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 11 Sep 2017 16:32:07 -0700 Subject: test - integration - build - manually exit from test builder + add bundle destination log --- test/integration/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/index.js b/test/integration/index.js index 8dc8a408f..144303dbb 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -20,6 +20,7 @@ pump( writeStream, (err) => { if (err) throw err - console.log('bundle completed.') + console.log(`Integration test build completed: "${bundlePath}"`) + process.exit(0) } ) \ No newline at end of file -- cgit v1.2.3 From 0e70366e9c31d3085d505f110b586418c72c217e Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 11 Sep 2017 20:14:52 -0700 Subject: test - integration - drop testem for karma --- test/integration/helpers.js | 7 ----- test/integration/lib/first-time.js | 58 ++++++++++++++++++++++++++++---------- 2 files changed, 43 insertions(+), 22 deletions(-) delete mode 100644 test/integration/helpers.js (limited to 'test') diff --git a/test/integration/helpers.js b/test/integration/helpers.js deleted file mode 100644 index 10cd74e64..000000000 --- a/test/integration/helpers.js +++ /dev/null @@ -1,7 +0,0 @@ -function wait(time) { - return new Promise(function (resolve, reject) { - setTimeout(function () { - resolve() - }, time * 3 || 1500) - }) -} diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index cc56b3704..c5ecfef95 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -10,26 +10,46 @@ QUnit.test('render init screen', (assert) => { }) }) +<<<<<<< HEAD +======= +// QUnit.testDone(({ module, name, total, passed, failed, skipped, todo, runtime }) => { +// if (failed > 0) { +// const app = $('iframe').contents()[0].documentElement +// console.warn('Test failures - dumping DOM:') +// console.log(app.innerHTML) +// } +// }) + +>>>>>>> 5c53bab... test - integration - drop testem for karma async function runFirstTimeUsageTest(assert, done) { - await wait() - const app = $('iframe').contents().find('#app-content .mock-app-root') + await timeout() + + const app = $('#app-content .mock-app-root') const recurseNotices = async () => { const button = app.find('button') if (button.html() === 'Accept') { const termsPage = app.find('.markdown')[0] termsPage.scrollTop = termsPage.scrollHeight - await wait() + await timeout() button.click() +<<<<<<< HEAD await wait() await recurseNotices() +======= + await timeout() +>>>>>>> 5c53bab... test - integration - drop testem for karma } else { await wait() } } +<<<<<<< HEAD await recurseNotices() +======= + await timeout() +>>>>>>> 5c53bab... test - integration - drop testem for karma // Scroll through terms const title = app.find('h1').text() @@ -41,13 +61,13 @@ async function runFirstTimeUsageTest(assert, done) { pwBox.value = PASSWORD confBox.value = PASSWORD - await wait() + await timeout() // create vault const createButton = app.find('button.primary')[0] createButton.click() - await wait(1500) + await timeout(1500) const created = app.find('h3')[0] assert.equal(created.textContent, 'Vault Created', 'Vault created screen') @@ -57,7 +77,7 @@ async function runFirstTimeUsageTest(assert, done) { assert.ok(button, 'button present') button.click() - await wait(1000) + await timeout(1000) const detail = app.find('.account-detail-section')[0] assert.ok(detail, 'Account detail section loaded.') @@ -65,7 +85,7 @@ async function runFirstTimeUsageTest(assert, done) { const sandwich = app.find('.sandwich-expando')[0] sandwich.click() - await wait() + await timeout() const menu = app.find('.menu-droppo')[0] const children = menu.children @@ -73,7 +93,7 @@ async function runFirstTimeUsageTest(assert, done) { assert.ok(lock, 'Lock menu item found') lock.click() - await wait(1000) + await timeout(1000) const pwBox2 = app.find('#password-box')[0] pwBox2.value = PASSWORD @@ -81,39 +101,47 @@ async function runFirstTimeUsageTest(assert, done) { const createButton2 = app.find('button.primary')[0] createButton2.click() - await wait(1000) + await timeout(1000) const detail2 = app.find('.account-detail-section')[0] assert.ok(detail2, 'Account detail section loaded again.') - await wait() + await timeout() // open account settings dropdown const qrButton = app.find('.fa.fa-ellipsis-h')[0] qrButton.click() - await wait(1000) + await timeout(1000) // qr code item const qrButton2 = app.find('.dropdown-menu-item')[1] qrButton2.click() - await wait(1000) + await timeout(1000) const qrHeader = app.find('.qr-header')[0] const qrContainer = app.find('#qr-container')[0] assert.equal(qrHeader.textContent, 'Account 1', 'Should show account label.') assert.ok(qrContainer, 'QR Container found') - await wait() + await timeout() const networkMenu = app.find('.network-indicator')[0] networkMenu.click() - await wait() + await timeout() const networkMenu2 = app.find('.network-indicator')[0] const children2 = networkMenu2.children children2.length[3] assert.ok(children2, 'All network options present') -} \ No newline at end of file +} + +function timeout(time) { + return new Promise(function (resolve, reject) { + setTimeout(function () { + resolve() + }, time * 3 || 1500) + }) +} -- cgit v1.2.3 From 48d21f4fca75e1f012ee881eb741a703051ee338 Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 11 Sep 2017 22:34:16 -0700 Subject: tests - integration - fix bad cherry-pick --- test/integration/lib/first-time.js | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'test') diff --git a/test/integration/lib/first-time.js b/test/integration/lib/first-time.js index c5ecfef95..38a94e551 100644 --- a/test/integration/lib/first-time.js +++ b/test/integration/lib/first-time.js @@ -5,13 +5,11 @@ QUnit.module('first time usage') QUnit.test('render init screen', (assert) => { const done = assert.async() runFirstTimeUsageTest(assert).then(done).catch((err) => { - assert.notOk(err, 'Should not error') + assert.notOk(err, `Error was thrown: ${err.stack}`) done() }) }) -<<<<<<< HEAD -======= // QUnit.testDone(({ module, name, total, passed, failed, skipped, todo, runtime }) => { // if (failed > 0) { // const app = $('iframe').contents()[0].documentElement @@ -20,36 +18,29 @@ QUnit.test('render init screen', (assert) => { // } // }) ->>>>>>> 5c53bab... test - integration - drop testem for karma async function runFirstTimeUsageTest(assert, done) { await timeout() const app = $('#app-content .mock-app-root') - const recurseNotices = async () => { + // recurse notices + while (true) { const button = app.find('button') if (button.html() === 'Accept') { + // still notices to accept const termsPage = app.find('.markdown')[0] termsPage.scrollTop = termsPage.scrollHeight await timeout() button.click() -<<<<<<< HEAD - await wait() - await recurseNotices() -======= await timeout() ->>>>>>> 5c53bab... test - integration - drop testem for karma } else { - await wait() + // exit loop + break } } -<<<<<<< HEAD - await recurseNotices() -======= await timeout() ->>>>>>> 5c53bab... test - integration - drop testem for karma // Scroll through terms const title = app.find('h1').text() @@ -144,4 +135,4 @@ function timeout(time) { resolve() }, time * 3 || 1500) }) -} +} \ No newline at end of file -- cgit v1.2.3