UNPKG

@sofaws/dapp-core

Version:

A library to hold the main logic for a dapp on the Elrond Network

3 lines (2 loc) 809 B
"use strict";import{a as c}from"../../../../../__chunks__/chunk-BNOXD7GM.js";import{a}from"../../../../../__chunks__/chunk-RQ3IOPRD.js";import{i as m}from"../../../../../__chunks__/chunk-7QE2X3X4.js";import{a as t,b as n,m as o}from"../../../../../__chunks__/chunk-HBP5N4FR.js";o();m();describe("getTransactionReceiver",()=>{it("returns receiver address from transaction body",()=>{let e=n(t({},c),{receiver:"receiver-hash"}),r=a(e);expect(r).toEqual(e.receiver)}),it("returns receiver address from the transaction action arguments if exists",()=>{var s,i;let e=n(t({},c),{action:{category:"esdtNft",name:"transfer",arguments:{receiver:"receiver-hash"}}}),r=a(e);expect(r).toEqual((i=(s=e.action)==null?void 0:s.arguments)==null?void 0:i.receiver)})}); //# sourceMappingURL=getTransactionReceiver.test.js.map