@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 1.13 kB
JavaScript
;import{a as i}from"../../../../../__chunks__/chunk-BNOXD7GM.js";import{a as s}from"../../../../../__chunks__/chunk-FMIRA7YL.js";import"../../../../../__chunks__/chunk-RQ3IOPRD.js";import{i as o}from"../../../../../__chunks__/chunk-7QE2X3X4.js";import{a as n,b as t,m as c}from"../../../../../__chunks__/chunk-HBP5N4FR.js";c();o();describe("getTransactionReceiverAssets",()=>{it("returns receiver assets",()=>{let e=t(n({},i),{receiver:"receiver-hash",receiverAssets:{name:"john doe",description:"description",iconPng:"icon.png",iconSvg:"icon.svg",tags:["@tag1","@tag2"]}}),r=s(e);expect(r).toBe(e.receiverAssets)}),it('returns "undefined" when the transaction receiver does not match the receiver address from the transaction action arguments',()=>{let e=t(n({},i),{receiver:"receiver-hash",receiverAssets:{name:"john doe",description:"description",iconPng:"icon.png",iconSvg:"icon.svg",tags:["@tag1","@tag2"]},action:{name:"transfer",category:"scCall",arguments:{receiver:"receiver-hash-from-action-arguments"}}}),r=s(e);expect(r).toBeUndefined()})});
//# sourceMappingURL=getTransactionReceiverAssets.test.js.map