diff --git a/web/cashtab/src/hooks/useWallet.js b/web/cashtab/src/hooks/useWallet.js --- a/web/cashtab/src/hooks/useWallet.js +++ b/web/cashtab/src/hooks/useWallet.js @@ -7,7 +7,11 @@ import usePrevious from '@hooks/usePrevious'; import useBCH from '@hooks/useBCH'; import BigNumber from 'bignumber.js'; -import { fromSmallestDenomination } from '@utils/cashMethods'; +import { + fromSmallestDenomination, + loadStoredWallet, + isValidStoredWallet, +} from '@utils/cashMethods'; import localforage from 'localforage'; import { currency } from '@components/Common/Ticker'; import _ from 'lodash'; @@ -19,9 +23,11 @@ const [apiError, setApiError] = useState(false); const [walletState, setWalletState] = useState({ balances: {}, + hydratedUtxoDetails: {}, tokens: [], - slpBalancesAndUtxos: [], + slpBalancesAndUtxos: {}, parsedTxHistory: [], + utxos: [], }); const { getBCH, @@ -118,7 +124,7 @@ }; }; - const haveUtxosChanged = (utxos, previousUtxos) => { + const haveUtxosChanged = (wallet, utxos, previousUtxos) => { // Relevant points for this array comparing exercise // https://stackoverflow.com/questions/13757109/triple-equal-signs-return-false-for-arrays-in-javascript-why // https://stackoverflow.com/questions/7837456/how-to-compare-arrays-in-javascript @@ -129,13 +135,24 @@ return true; } // If this is the first time the wallet received utxos - if ( - typeof previousUtxos === 'undefined' || - typeof utxos === 'undefined' - ) { + if (typeof utxos === 'undefined') { // Then they have certainly changed return true; } + if (typeof previousUtxos === 'undefined') { + // Compare to what you have in localStorage on startup + // If previousUtxos are undefined, see if you have previousUtxos in wallet state + // If you do, and it has everything you need, set wallet state with that instead of calling hydrateUtxos on all utxos + if (isValidStoredWallet(wallet)) { + // Convert all the token balance figures to big numbers + const liveWalletState = loadStoredWallet(wallet.state); + + return setWalletState(liveWalletState); + } + const cachedUtxos = wallet.state.utxos; + // Compare + return !_.isEqual(utxos, cachedUtxos); + } // return true for empty array, since this means you definitely do not want to skip the next API call if (utxos && utxos.length === 0) { return true; @@ -178,7 +195,12 @@ } setUtxos(utxos); - const utxosHaveChanged = haveUtxosChanged(utxos, previousUtxos); + // Need to call with wallet as a parameter rather than trusting it is in state, otherwise can sometimes get wallet=false from haveUtxosChanged + const utxosHaveChanged = haveUtxosChanged( + wallet, + utxos, + previousUtxos, + ); // If the utxo set has not changed, if (!utxosHaveChanged) { @@ -227,6 +249,10 @@ newState.parsedTxHistory = parsedWithTokens; + newState.utxos = utxos; + + newState.hydratedUtxoDetails = hydratedUtxoDetails; + setWalletState(newState); // Write this state to indexedDb using localForage @@ -356,10 +382,8 @@ const writeWalletState = async (wallet, newState) => { // Add new state as an object on the active wallet wallet.state = newState; - console.log(`wallet with state`, wallet); try { await localforage.setItem('wallet', wallet); - console.log(`Wallet new state successfully written`); } catch (err) { console.log(`Error in writeWalletState()`); console.log(err); diff --git a/web/cashtab/src/utils/__mocks__/mockCachedUtxos.js b/web/cashtab/src/utils/__mocks__/mockCachedUtxos.js new file mode 100644 --- /dev/null +++ b/web/cashtab/src/utils/__mocks__/mockCachedUtxos.js @@ -0,0 +1,574 @@ +// @generated + +import BigNumber from 'bignumber.js'; + +export const cachedUtxos = { + tokens: [ + { + info: { + height: 681188, + tx_hash: + '5b74e05ced6b7d862fe9cab94071b2ccfa475c0cef94b90c7edb8a06f90e5ad6', + tx_pos: 1, + value: 546, + txid: + '5b74e05ced6b7d862fe9cab94071b2ccfa475c0cef94b90c7edb8a06f90e5ad6', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '1e-7', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + balance: { + s: 1, + e: 1, + c: [66, 10000000], + }, + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + '52fe0ccf7b5936095bbdadebc0de9f844a99457096ca4f7b45543a2badefdf35', + tx_pos: 1, + value: 546, + txid: + '52fe0ccf7b5936095bbdadebc0de9f844a99457096ca4f7b45543a2badefdf35', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '4', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + balance: { + s: 1, + e: 1, + c: [15], + }, + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 1, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 1, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 1, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '1e-8', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + balance: { + s: 1, + e: -8, + c: [1000000], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 1, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'f6ef57f697219aaa576bf43d69a7f8b8753dcbcbb502f602259a7d14fafd52c5', + tx_pos: 1, + value: 546, + txid: + 'f6ef57f697219aaa576bf43d69a7f8b8753dcbcbb502f602259a7d14fafd52c5', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + balance: { + s: 1, + e: -8, + c: [1600000], + }, + hasBaton: false, + }, + { + info: { + height: 681329, + tx_hash: + '16ccf6a34209b25fe78f6a3cdf685eb89f498a7edf144b9e049958c8eda2b439', + tx_pos: 1, + value: 546, + txid: + '16ccf6a34209b25fe78f6a3cdf685eb89f498a7edf144b9e049958c8eda2b439', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'd849fbb04ce77870deaf0e2d9a67146b055f6d8bba18285f5c5f662e20d23199', + tokenTicker: 'BBT', + tokenName: 'BurnBits', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + 'd849fbb04ce77870deaf0e2d9a67146b055f6d8bba18285f5c5f662e20d23199', + balance: { + s: 1, + e: -9, + c: [100000], + }, + hasBaton: false, + }, + ], +}; +export const utxosLoadedFromCache = { + tokens: [ + { + info: { + height: 681188, + tx_hash: + '5b74e05ced6b7d862fe9cab94071b2ccfa475c0cef94b90c7edb8a06f90e5ad6', + tx_pos: 1, + value: 546, + txid: + '5b74e05ced6b7d862fe9cab94071b2ccfa475c0cef94b90c7edb8a06f90e5ad6', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '1e-7', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + balance: new BigNumber({ + s: 1, + e: 1, + c: [66, 10000000], + _isBigNumber: true, + }), + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + '52fe0ccf7b5936095bbdadebc0de9f844a99457096ca4f7b45543a2badefdf35', + tx_pos: 1, + value: 546, + txid: + '52fe0ccf7b5936095bbdadebc0de9f844a99457096ca4f7b45543a2badefdf35', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '4', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + balance: new BigNumber({ + s: 1, + e: 1, + c: [15], + _isBigNumber: true, + }), + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 1, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + balance: new BigNumber({ + s: 1, + e: 0, + c: [1], + _isBigNumber: true, + }), + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 1, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + balance: new BigNumber({ + s: 1, + e: 0, + c: [1], + _isBigNumber: true, + }), + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 1, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '1e-8', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + balance: new BigNumber({ + s: 1, + e: -8, + c: [1000000], + _isBigNumber: true, + }), + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 1, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + balance: new BigNumber({ + s: 1, + e: 0, + c: [1], + _isBigNumber: true, + }), + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'f6ef57f697219aaa576bf43d69a7f8b8753dcbcbb502f602259a7d14fafd52c5', + tx_pos: 1, + value: 546, + txid: + 'f6ef57f697219aaa576bf43d69a7f8b8753dcbcbb502f602259a7d14fafd52c5', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + balance: new BigNumber({ + s: 1, + e: -8, + c: [1600000], + _isBigNumber: true, + }), + hasBaton: false, + }, + { + info: { + height: 681329, + tx_hash: + '16ccf6a34209b25fe78f6a3cdf685eb89f498a7edf144b9e049958c8eda2b439', + tx_pos: 1, + value: 546, + txid: + '16ccf6a34209b25fe78f6a3cdf685eb89f498a7edf144b9e049958c8eda2b439', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'd849fbb04ce77870deaf0e2d9a67146b055f6d8bba18285f5c5f662e20d23199', + tokenTicker: 'BBT', + tokenName: 'BurnBits', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + tokenId: + 'd849fbb04ce77870deaf0e2d9a67146b055f6d8bba18285f5c5f662e20d23199', + balance: new BigNumber({ + s: 1, + e: -9, + c: [100000], + _isBigNumber: true, + }), + hasBaton: false, + }, + ], +}; diff --git a/web/cashtab/src/utils/__mocks__/mockStoredWallets.js b/web/cashtab/src/utils/__mocks__/mockStoredWallets.js new file mode 100644 --- /dev/null +++ b/web/cashtab/src/utils/__mocks__/mockStoredWallets.js @@ -0,0 +1,2327 @@ +// @generated + +export const validStoredWallet = { + mnemonic: 'Nope', + name: 'TripDos', + Path245: { + cashAddress: 'bitcoincash:qq0mw6nah9huwaxt45qw3fegjpszkjlrqsvttwy36p', + slpAddress: 'simpleledger:qq0mw6nah9huwaxt45qw3fegjpszkjlrqsqsq433yl', + fundingWif: 'Nope', + fundingAddress: + 'simpleledger:qq0mw6nah9huwaxt45qw3fegjpszkjlrqsqsq433yl', + legacyAddress: '13thfuvhCA1dGE7nVgyU61BZfoD8ApXJsg', + }, + Path145: { + cashAddress: 'bitcoincash:qz5lf9pxde9neq3hzte8mmwts03sktl9nuz6m3dynu', + slpAddress: 'simpleledger:qz5lf9pxde9neq3hzte8mmwts03sktl9nuwps2cydz', + fundingWif: 'Nope', + fundingAddress: + 'simpleledger:qz5lf9pxde9neq3hzte8mmwts03sktl9nuwps2cydz', + legacyAddress: '1GVeC3gB6V3EStcQbJiry5BJn4fRdHjKyc', + }, + Path1899: { + cashAddress: 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + slpAddress: 'simpleledger:qz2708636snqhsxu8wnlka78h6fdp77ar5syue64fa', + fundingWif: 'Nope', + fundingAddress: + 'simpleledger:qz2708636snqhsxu8wnlka78h6fdp77ar5syue64fa', + legacyAddress: '1Efd9z9GRVJK2r73nUpFmBnsKUmfXNm2y2', + }, + state: { + balances: { + totalBalanceInSatoshis: 1503017804, + totalBalance: 15.03017804, + }, + tokens: [ + { + info: { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + txid: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + tokenTicker: 'ST', + tokenName: 'ST', + tokenDocumentUrl: 'developer.bitcoin.com', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + txid: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + balance: { + s: 1, + e: -9, + c: [100000], + }, + hasBaton: false, + }, + { + info: { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + txid: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '523512277.7961432', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + balance: { + s: 1, + e: 8, + c: [523512277, 79614320000000], + }, + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + txid: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '996797', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + balance: { + s: 1, + e: 5, + c: [996797], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '0.99999999', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + balance: { + s: 1, + e: -1, + c: [99999999000000], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '999997.999999994', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + balance: { + s: 1, + e: 5, + c: [999997, 99999999400000], + }, + hasBaton: false, + }, + ], + slpBalancesAndUtxos: { + tokens: [ + { + info: { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + txid: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + tokenTicker: 'ST', + tokenName: 'ST', + tokenDocumentUrl: 'developer.bitcoin.com', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + txid: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + balance: { + s: 1, + e: -9, + c: [100000], + }, + hasBaton: false, + }, + { + info: { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + txid: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '523512277.7961432', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + balance: { + s: 1, + e: 8, + c: [523512277, 79614320000000], + }, + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + txid: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '996797', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + balance: { + s: 1, + e: 5, + c: [996797], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '0.99999999', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + balance: { + s: 1, + e: -1, + c: [99999999000000], + }, + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + balance: { + s: 1, + e: 0, + c: [1], + }, + hasBaton: false, + }, + { + info: { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '999997.999999994', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + balance: { + s: 1, + e: 5, + c: [999997, 99999999400000], + }, + hasBaton: false, + }, + ], + nonSlpUtxos: [ + { + height: 682107, + tx_hash: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + tx_pos: 1, + value: 1503017804, + txid: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + vout: 1, + isValid: false, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + wif: 'Nope', + }, + ], + slpUtxos: [ + { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + txid: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + tokenTicker: 'ST', + tokenName: 'ST', + tokenDocumentUrl: 'developer.bitcoin.com', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + txid: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + txid: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '523512277.7961432', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + txid: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '996797', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '0.99999999', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '999997.999999994', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + ], + }, + parsedTxHistory: [ + { + txid: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + confirmations: 644, + height: 682107, + blocktime: 1618439595, + amountSent: 0.00002, + amountReceived: 0, + tokenTx: false, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + { + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + confirmations: 1422, + height: 681329, + blocktime: 1617988189, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '1e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + { + txid: + 'f27ff24c15b01c30d44218c6dc8706fd33cc7bc9b4b38399075f0f41d8e412af', + confirmations: 1559, + height: 681192, + blocktime: 1617923457, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '5e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + { + txid: + 'b7f8b23f5ce12842eb655239919b6142052a2fa2b2ce974a4baac36b0137f332', + confirmations: 1559, + height: 681192, + blocktime: 1617923457, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '4e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + { + txid: + '880baf5691c2b4c5a22ae4032e2004c0c54bfabf003468044a2e341846137136', + confirmations: 1559, + height: 681192, + blocktime: 1617923457, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '3e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + ], + utxos: [ + { + utxos: [], + address: + 'bitcoincash:qq0mw6nah9huwaxt45qw3fegjpszkjlrqsvttwy36p', + }, + { + utxos: [], + address: + 'bitcoincash:qz5lf9pxde9neq3hzte8mmwts03sktl9nuz6m3dynu', + }, + { + utxos: [ + { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + }, + { + height: 680784, + tx_hash: + '28f061fee068d3b9cb578141bac3d4d9ec4eccebec680464bf0aafaac414811f', + tx_pos: 1, + value: 546, + }, + { + height: 680784, + tx_hash: + '5fa3ffccea55c968beb7d214c563c92336ce2bbccbb714ba819848a7f7060bdb', + tx_pos: 1, + value: 546, + }, + { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + }, + { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + }, + { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + }, + { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + }, + { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + }, + { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + }, + { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + }, + { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + }, + { + height: 682107, + tx_hash: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + tx_pos: 1, + value: 1503017804, + }, + ], + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + ], + hydratedUtxoDetails: { + slpUtxos: [ + { + utxos: [ + { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + txid: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + tokenTicker: 'ST', + tokenName: 'ST', + tokenDocumentUrl: 'developer.bitcoin.com', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 680784, + tx_hash: + '28f061fee068d3b9cb578141bac3d4d9ec4eccebec680464bf0aafaac414811f', + tx_pos: 1, + value: 546, + txid: + '28f061fee068d3b9cb578141bac3d4d9ec4eccebec680464bf0aafaac414811f', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bd1acc4c986de57af8d6d2a64aecad8c30ee80f37ae9d066d758923732ddc9ba', + tokenTicker: 'TBS', + tokenName: 'TestBits', + tokenDocumentUrl: 'https://thecryptoguy.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '9897999885.21030105', + isValid: false, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 680784, + tx_hash: + '5fa3ffccea55c968beb7d214c563c92336ce2bbccbb714ba819848a7f7060bdb', + tx_pos: 1, + value: 546, + txid: + '5fa3ffccea55c968beb7d214c563c92336ce2bbccbb714ba819848a7f7060bdb', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '308.87654321', + isValid: false, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + txid: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + txid: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '523512277.7961432', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + txid: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '996797', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '0.99999999', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '999997.999999994', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 682107, + tx_hash: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + tx_pos: 1, + value: 1503017804, + txid: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + vout: 1, + isValid: false, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + wif: 'Nope', + }, + ], + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + ], + }, + }, +}; + +// Sample unmigrated (i.e. before diff adding required fields to wallet.state) wallet, with private key info removed +export const invalidStoredWallet = { + mnemonic: 'Remembered to take this out this time', + name: 'TripDos', + Path245: { + cashAddress: 'bitcoincash:qq0mw6nah9huwaxt45qw3fegjpszkjlrqsvttwy36p', + slpAddress: 'simpleledger:qq0mw6nah9huwaxt45qw3fegjpszkjlrqsqsq433yl', + fundingWif: 'Remembered to take this out this time', + fundingAddress: + 'simpleledger:qq0mw6nah9huwaxt45qw3fegjpszkjlrqsqsq433yl', + legacyAddress: '13thfuvhCA1dGE7nVgyU61BZfoD8ApXJsg', + }, + Path145: { + cashAddress: 'bitcoincash:qz5lf9pxde9neq3hzte8mmwts03sktl9nuz6m3dynu', + slpAddress: 'simpleledger:qz5lf9pxde9neq3hzte8mmwts03sktl9nuwps2cydz', + fundingWif: 'Remembered to take this out this time', + fundingAddress: + 'simpleledger:qz5lf9pxde9neq3hzte8mmwts03sktl9nuwps2cydz', + legacyAddress: '1GVeC3gB6V3EStcQbJiry5BJn4fRdHjKyc', + }, + Path1899: { + cashAddress: 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + slpAddress: 'simpleledger:qz2708636snqhsxu8wnlka78h6fdp77ar5syue64fa', + fundingWif: 'Remembered to take this out this time', + fundingAddress: + 'simpleledger:qz2708636snqhsxu8wnlka78h6fdp77ar5syue64fa', + legacyAddress: '1Efd9z9GRVJK2r73nUpFmBnsKUmfXNm2y2', + }, + state: { + balances: { + totalBalanceInSatoshis: 1503017804, + totalBalance: 15.03017804, + }, + tokens: [ + { + info: { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + txid: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + tokenTicker: 'ST', + tokenName: 'ST', + tokenDocumentUrl: 'developer.bitcoin.com', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + txid: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + balance: '1e-9', + hasBaton: false, + }, + { + info: { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + txid: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '523512277.7961432', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + balance: '523512277.7961432', + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + txid: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '996797', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + balance: '996797', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '0.99999999', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + balance: '0.99999999', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '999997.999999994', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + balance: '999997.999999994', + hasBaton: false, + }, + ], + slpBalancesAndUtxos: { + tokens: [ + { + info: { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + txid: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + tokenTicker: 'ST', + tokenName: 'ST', + tokenDocumentUrl: 'developer.bitcoin.com', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + txid: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + balance: '1e-9', + hasBaton: false, + }, + { + info: { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + txid: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '523512277.7961432', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + balance: '523512277.7961432', + hasBaton: false, + }, + { + info: { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + txid: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '996797', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + balance: '996797', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '0.99999999', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + balance: '0.99999999', + hasBaton: false, + }, + { + info: { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + balance: '1', + hasBaton: false, + }, + { + info: { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '999997.999999994', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + balance: '999997.999999994', + hasBaton: false, + }, + ], + nonSlpUtxos: [ + { + height: 682107, + tx_hash: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + tx_pos: 1, + value: 1503017804, + txid: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + vout: 1, + isValid: false, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + wif: 'Remembered to take this out this time', + }, + ], + slpUtxos: [ + { + height: 680782, + tx_hash: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + tx_pos: 1, + value: 546, + txid: + '525457276f1b6984170c9b35a8312d4988fce495723eabadd2afcdb3b872b2f1', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bf24d955f59351e738ecd905966606a6837e478e1982943d724eab10caad82fd', + tokenTicker: 'ST', + tokenName: 'ST', + tokenDocumentUrl: 'developer.bitcoin.com', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 680784, + tx_hash: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + tx_pos: 1, + value: 546, + txid: + 'daa98a872b7d88fefd2257b006db001ef82a601f3943b92e0c753076598a7b75', + vout: 1, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'bef614aac85c0c866f4d39e4d12a96851267d38d1bca5bdd6488bbd42e28b6b1', + tokenTicker: 'CTP', + tokenName: 'Cash Tab Points', + tokenDocumentUrl: 'https://cashtabapp.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '1e-9', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681189, + tx_hash: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + tx_pos: 2, + value: 546, + txid: + 'f38ccfa615e38f0c871f4eb35db420157808014f1f5743f1522529253c0c4c56', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7443f7c831cdf2b2b04d5f0465ed0bcf348582675b0e4f17906438c232c22f3d', + tokenTicker: 'WDT', + tokenName: + 'Test Token With Exceptionally Long Name For CSS And Style Revisions', + tokenDocumentUrl: + 'https://www.ImpossiblyLongWebsiteDidYouThinkWebDevWouldBeFun.org', + tokenDocumentHash: + '����\\�IS\u001e9�����k+���\u0018���\u001b]�߷2��', + decimals: 7, + tokenType: 1, + tokenQty: '523512277.7961432', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681190, + tx_hash: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + tx_pos: 2, + value: 546, + txid: + 'e9dca9aa954131a0004325fff11dfddcd6e5843c468116cf4d38cb264032cdc0', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1f6a65e7a4bde92c0a012de2bcf4007034504a765377cdf08a3ee01d1eaa6901', + tokenTicker: '🍔', + tokenName: 'Burger', + tokenDocumentUrl: + 'https://c4.wallpaperflare.com/wallpaper/58/564/863/giant-hamburger-wallpaper-preview.jpg', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + tx_pos: 2, + value: 546, + txid: + '091c9f32deb2f4f3733673803f51acf050b65d8042d1561824c6cd22d14bb43b', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '4bd147fc5d5ff26249a9299c46b80920c0b81f59a60e05428262160ebee0b0c3', + tokenTicker: 'NOCOVID', + tokenName: 'Covid19 Lifetime Immunity', + tokenDocumentUrl: + 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/covid-19-vaccines', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '996797', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + tx_pos: 2, + value: 546, + txid: + 'b35c502f388cdfbdd6841b7a73e973149b3c8deca76295a3e4665939e0562796', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'dd84ca78db4d617221b58eabc6667af8fe2f7eadbfcc213d35be9f1b419beb8d', + tokenTicker: 'TAP', + tokenName: 'Thoughts and Prayers', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + tx_pos: 2, + value: 546, + txid: + 'c70408fca1a5bf48f338f7ef031e586293be6948a5bff1fbbdd4eb923ef11e59', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + 'df808a41672a0a0ae6475b44f272a107bc9961b90f29dc918d71301f24fe92fb', + tokenTicker: 'NAKAMOTO', + tokenName: 'NAKAMOTO', + tokenDocumentUrl: '', + tokenDocumentHash: '', + decimals: 8, + tokenType: 1, + tokenQty: '0.99999999', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681191, + tx_hash: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + tx_pos: 2, + value: 546, + txid: + 'e1097932e5a607c100dc73fa18169be2e501e1782c7c94500742974d6353476c', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1', + tokenTicker: 'HONK', + tokenName: 'HONK HONK', + tokenDocumentUrl: 'THE REAL HONK SLP TOKEN', + tokenDocumentHash: '', + decimals: 0, + tokenType: 1, + tokenQty: '1', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + { + height: 681329, + tx_hash: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + tx_pos: 2, + value: 546, + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + vout: 2, + utxoType: 'token', + transactionType: 'send', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenTicker: 'XBIT', + tokenName: 'eBits', + tokenDocumentUrl: 'https://boomertakes.com/', + tokenDocumentHash: '', + decimals: 9, + tokenType: 1, + tokenQty: '999997.999999994', + isValid: true, + address: + 'bitcoincash:qz2708636snqhsxu8wnlka78h6fdp77ar5ulhz04hr', + }, + ], + }, + parsedTxHistory: [ + { + txid: + '8d4c90ecf069e3a1494339724ddbb8bf28e3b38315a009ca5c49237b3ae7687a', + confirmations: 643, + height: 682107, + blocktime: 1618439595, + amountSent: 0.00002, + amountReceived: 0, + tokenTx: false, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + }, + { + txid: + '08e9a7b9537e60f630eba0f339be6b97e9d8061d5fc0c4d3247226fc86574ce9', + confirmations: 1421, + height: 681329, + blocktime: 1617988189, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '1e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + { + txid: + 'f27ff24c15b01c30d44218c6dc8706fd33cc7bc9b4b38399075f0f41d8e412af', + confirmations: 1558, + height: 681192, + blocktime: 1617923457, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '5e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + { + txid: + 'b7f8b23f5ce12842eb655239919b6142052a2fa2b2ce974a4baac36b0137f332', + confirmations: 1558, + height: 681192, + blocktime: 1617923457, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '4e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + { + txid: + '880baf5691c2b4c5a22ae4032e2004c0c54bfabf003468044a2e341846137136', + confirmations: 1558, + height: 681192, + blocktime: 1617923457, + amountSent: 0.00000546, + amountReceived: 0, + tokenTx: true, + outgoingTx: true, + destinationAddress: + 'bitcoincash:qqartrrq3npyzpcqswq2hcslstzu38mq8gvgtuqfpf', + tokenInfo: { + qtySent: '3e-9', + qtyReceived: '0', + tokenId: + '1101bd5d7b6bbc3176fb2b93d08e76ab532b04ff731d71502249e3cb9b6fcb1a', + tokenName: 'eBits', + tokenTicker: 'XBIT', + }, + }, + ], + }, +}; diff --git a/web/cashtab/src/utils/__tests__/cashMethods.test.js b/web/cashtab/src/utils/__tests__/cashMethods.test.js --- a/web/cashtab/src/utils/__tests__/cashMethods.test.js +++ b/web/cashtab/src/utils/__tests__/cashMethods.test.js @@ -3,6 +3,8 @@ formatBalance, batchArray, flattenBatchedHydratedUtxos, + loadStoredWallet, + isValidStoredWallet, } from '@utils/cashMethods'; import { unbatchedArray, @@ -10,11 +12,17 @@ } from '../__mocks__/mockBatchedArrays'; import { - originalFinal, - batchedFinal, unflattenedHydrateUtxosResponse, flattenedHydrateUtxosResponse, } from '../__mocks__/flattenBatchedHydratedUtxosMocks'; +import { + cachedUtxos, + utxosLoadedFromCache, +} from '../__mocks__/mockCachedUtxos'; +import { + validStoredWallet, + invalidStoredWallet, +} from '../__mocks__/mockStoredWallets'; describe('Correctly executes cash utility functions', () => { it(`Correctly converts smallest base unit to smallest decimal for cashDecimals = 2`, () => { @@ -66,4 +74,15 @@ flattenBatchedHydratedUtxos(unflattenedHydrateUtxosResponse), ).toStrictEqual(flattenedHydrateUtxosResponse); }); + it(`Accepts a cachedWalletState that has not preserved BigNumber object types, and returns the same wallet state with BigNumber type re-instituted`, () => { + expect(loadStoredWallet(cachedUtxos)).toStrictEqual( + utxosLoadedFromCache, + ); + }); + it(`Recognizes a stored wallet as valid if it has all required fields`, () => { + expect(isValidStoredWallet(validStoredWallet)).toBe(true); + }); + it(`Recognizes a stored wallet as invalid if it is missing required fields`, () => { + expect(isValidStoredWallet(invalidStoredWallet)).toBe(false); + }); }); diff --git a/web/cashtab/src/utils/cashMethods.js b/web/cashtab/src/utils/cashMethods.js --- a/web/cashtab/src/utils/cashMethods.js +++ b/web/cashtab/src/utils/cashMethods.js @@ -102,3 +102,31 @@ } return flattenedBatchedHydratedUtxos; }; + +export const loadStoredWallet = walletStateFromStorage => { + // Accept cached tokens array that does not save BigNumber type of BigNumbers + // Return array with BigNumbers converted + // See BigNumber.js api for how to create a BigNumber object from an object + // https://mikemcl.github.io/bignumber.js/ + const liveWalletState = walletStateFromStorage; + const { tokens } = liveWalletState; + for (let i = 0; i < tokens.length; i += 1) { + const thisTokenBalance = tokens[i].balance; + thisTokenBalance._isBigNumber = true; + tokens[i].balance = new BigNumber(thisTokenBalance); + } + return liveWalletState; +}; + +export const isValidStoredWallet = walletStateFromStorage => { + return ( + typeof walletStateFromStorage === 'object' && + 'state' in walletStateFromStorage && + typeof walletStateFromStorage.state === 'object' && + 'balances' in walletStateFromStorage.state && + 'utxos' in walletStateFromStorage.state && + 'hydratedUtxoDetails' in walletStateFromStorage.state && + 'slpBalancesAndUtxos' in walletStateFromStorage.state && + 'tokens' in walletStateFromStorage.state + ); +};