Skip to content

Commit 863dbd3

Browse files
committed
Fix EscrowUtils to return null if escrow is not found
1 parent de567bf commit 863dbd3

File tree

1 file changed

+4
-1
lines changed
  • packages/sdk/typescript/human-protocol-sdk/src

1 file changed

+4
-1
lines changed

packages/sdk/typescript/human-protocol-sdk/src/escrow.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,9 +1958,12 @@ export class EscrowUtils {
19581958
GET_ESCROW_BY_ADDRESS_QUERY(),
19591959
{ escrowAddress: escrowAddress.toLowerCase() }
19601960
);
1961+
if (!escrow) {
1962+
return null;
1963+
}
19611964
escrow.chainId = networkData.chainId;
19621965

1963-
return escrow || null;
1966+
return escrow;
19641967
}
19651968

19661969
/**

0 commit comments

Comments
 (0)