diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-21 09:51:15 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-21 09:51:35 +0800 |
commit | ab7eb73ecc9e1eac8a5934a59c186e9f92a0bb32 (patch) | |
tree | d0e54e987f7ee42d21dd8a5aeb582c4a2c72e02c /test/lib | |
parent | 6e813db47309b7773d430fecc6a467be66f6f16b (diff) | |
parent | 887cad973f25f43d2d4502ff31657f156a44b188 (diff) | |
download | tangerine-wallet-browser-ab7eb73ecc9e1eac8a5934a59c186e9f92a0bb32.tar.gz tangerine-wallet-browser-ab7eb73ecc9e1eac8a5934a59c186e9f92a0bb32.tar.zst tangerine-wallet-browser-ab7eb73ecc9e1eac8a5934a59c186e9f92a0bb32.zip |
fix merge conflicts
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/createTxMeta.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/lib/createTxMeta.js b/test/lib/createTxMeta.js new file mode 100644 index 000000000..0e88e3cfb --- /dev/null +++ b/test/lib/createTxMeta.js @@ -0,0 +1,16 @@ +const txStateHistoryHelper = require('../../app/scripts/controllers/transactions/lib/tx-state-history-helper') + +module.exports = createTxMeta + +function createTxMeta (partialMeta) { + const txMeta = Object.assign({ + status: 'unapproved', + txParams: {}, + }, partialMeta) + // initialize history + txMeta.history = [] + // capture initial snapshot of txMeta for history + const snapshot = txStateHistoryHelper.snapshotFromTxMeta(txMeta) + txMeta.history.push(snapshot) + return txMeta +} |