Skip to content

Commit

Permalink
Merge pull request #255 from arda-org/use-status-for-EGLD-transfers
Browse files Browse the repository at this point in the history
Use status to check the completion of EGLD transfer
  • Loading branch information
lcswillems authored Feb 24, 2025
2 parents 1648c38 + 9b6c8eb commit 4997333
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions xsuite/src/proxy/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
eCodeMetadata,
} from "../data/encoding";
import { Kvs } from "../data/kvs";
import { base64ToHex, getAddressShard, u8aToHex } from "../data/utils";
import { base64ToHex, u8aToHex } from "../data/utils";
import { Optional, Prettify } from "../helpers";

export class Proxy {
Expand Down Expand Up @@ -505,12 +505,12 @@ const findSuccessInTxData = (
elapsedBlocks: number,
): true | undefined => {
if (elapsedBlocks >= 11) return true; // TODO-MvX: remove this when completedTxEvent fix in proxy
if (txData.status && !txData.logs && !txData.smartContractResults) {
if (getAddressShard(txData.sender) === getAddressShard(txData.receiver)) {
if (elapsedBlocks >= 1) return true;
} else {
if (elapsedBlocks >= 4) return true;
}
if (
txData.status === "success" &&
!txData.logs &&
!txData.smartContractResults
) {
return true;
}
const events = txData.logs?.events;
if (events) {
Expand Down

0 comments on commit 4997333

Please sign in to comment.