Skip to content

Commit

Permalink
consistent check for claimed or cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
sgc-code committed Jul 8, 2024
1 parent 20e0348 commit 0cb7be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/contracts/escrow_library.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ mod EscrowLibrary {
let contract_address = get_contract_address();
assert(get_caller_address() == gift.sender, 'escr-lib/wrong-sender');
let gift_balance = balance_of(gift.gift_token, contract_address);
assert(gift_balance > 0, 'escr-lib/already-claimed');
assert(gift_balance >= gift.gift_amount, 'escr-lib/claimed-or-cancel');
if gift.gift_token == gift.fee_token {
// Sender also gets the dust
transfer_from_account(gift.gift_token, gift.sender, gift_balance);
Expand Down

0 comments on commit 0cb7be8

Please sign in to comment.