Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! test: add test for receivers accou…
Browse files Browse the repository at this point in the history
…nt precheck

Signed-off-by: Nadezhda Popova <nadezhda.popova@limechain.tech>
  • Loading branch information
nadezhdapopovaa committed Dec 13, 2024
1 parent 5850f89 commit f43a76e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/relay/src/lib/precheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export class Precheck {
const verifyAccount = await this.mirrorNodeClient.getAccount(tx.to, requestDetails);

// When `receiver_sig_required` is set to true, the receiver's account must sign all incoming transactions.
if (verifyAccount !== null && verifyAccount.receiver_sig_required === true) {
if (verifyAccount && verifyAccount.receiver_sig_required) {
throw predefined.RECEIVER_SIGNATURE_ENABLED;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('@ethSendRawTransaction eth_sendRawTransaction spec', async function ()
const RECEIVER_ACCOUNT_RES = {
account: ACCOUNT_ADDRESS_1,
balance: {
balance: Hbar.from(100_000_000_000, HbarUnit.Hbar).to(HbarUnit.Tinybar),
balance: Hbar.from(1, HbarUnit.Hbar).to(HbarUnit.Tinybar),
},
receiver_sig_required: false,
};
Expand Down

0 comments on commit f43a76e

Please sign in to comment.