Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/utils/__tests__/chronik.test.js
Show First 20 Lines • Show All 564 Lines • ▼ Show 20 Lines | ).toStrictEqual({ | ||||
airdropTokenId: '', | airdropTokenId: '', | ||||
opReturnMessage: 'Only the message recipient can view this', | opReturnMessage: 'Only the message recipient can view this', | ||||
isCashtabMessage: true, | isCashtabMessage: true, | ||||
isEncryptedMessage: true, | isEncryptedMessage: true, | ||||
decryptionSuccess: false, | decryptionSuccess: false, | ||||
replyAddress: 'ecash:qrhxmjw5p72a3cgx5cect3h63q5erw0gfcvjnyv7xt', | replyAddress: 'ecash:qrhxmjw5p72a3cgx5cect3h63q5erw0gfcvjnyv7xt', | ||||
}); | }); | ||||
}); | }); | ||||
it(`Correctly parses a received encyrpted message transaction`, () => { | it(`Correctly parses a received encrypted message transaction`, () => { | ||||
const BCH = new BCHJS({ | const BCH = new BCHJS({ | ||||
restURL: 'https://FakeBchApiUrlToEnsureMocksOnly.com', | restURL: 'https://FakeBchApiUrlToEnsureMocksOnly.com', | ||||
}); | }); | ||||
// This function needs to be mocked as bch-js functions that require Buffer types do not work in jest environment | // This function needs to be mocked as bch-js functions that require Buffer types do not work in jest environment | ||||
BCH.Address.hash160ToCash = jest | BCH.Address.hash160ToCash = jest | ||||
.fn() | .fn() | ||||
.mockReturnValue( | .mockReturnValue( | ||||
'bitcoincash:qp89xgjhcqdnzzemts0aj378nfe2mhu9yvll3cvjwd', | 'bitcoincash:qp89xgjhcqdnzzemts0aj378nfe2mhu9yvll3cvjwd', | ||||
▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines |