axelarnetwork / axelarjs

Axelar Network foundations for Javascript/Typescript application development
Apache License 2.0
10 stars 8 forks source link

feat: add query transaction status #379

Closed npty closed 5 months ago

npty commented 5 months ago

Description

AXE-4225

Migrated the queryTransactionStatus function from SDK v1.

There're some difference between response in v1 and v2 as follows

Response in V1

✅ Success:

{
      status: string,
      error: object,
      timeSpent: object,
      gasPaidInfo: object,
      callTx: object,
      executed: object,
      expressExecuted: object,
      approved: object
};

❌ Fail

{
status: "cannot_fetch_status"
}

Response in V2 (This package)

✅ Success

{
  success: true;
  data: {
    status: GMPTxStatus;
    error?: QueryTransactionStatusError | undefined;
    timeSpent: SearchGMPTimespent;
    gasPaidInfo: {
      status: SearchGMPGasStatus;
      details: SearchGMPGasPaid;
    };
    callTx: SearchGMPCall;
    executed?: SearchGMPExecuted | undefined;
    expressExecuted?: SearchGMPExpressExecuted | undefined;
    expressExecutedAt?: number | undefined;
    approved?: SearchGMPApprove | undefined;
  };
};

❌ Fail

{
  success: false;
  error: "Transaction not found";
};
changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: 2355863d2391aa64e3cf6b238d5d01733c352850

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | ------------------------------ | ----- | | @axelarjs/transaction-recovery | Patch | | @axelarjs/api | Patch | | @axelarjs/deposit-address | Patch | | @axelarjs/maestro | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
axelar-maestro ❌ Failed (Inspect) Jun 19, 2024 1:42pm
axelar-registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 1:42pm
axelar-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 1:42pm