Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add query transaction status #379

Merged
merged 5 commits into from
Jun 20, 2024
Merged

Conversation

npty
Copy link
Member

@npty npty commented Jun 19, 2024

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";
};

Copy link

changeset-bot bot commented Jun 19, 2024

🦋 Changeset detected

Latest commit: 2355863

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

Copy link

vercel bot commented Jun 19, 2024

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

@npty npty merged commit 9112594 into main Jun 20, 2024
3 of 5 checks passed
@npty npty deleted the feat/add-query-transaction-status branch June 20, 2024 14:51
SGiaccobasso added a commit that referenced this pull request Jun 27, 2024
* feat:add-tx-recovery (#363)

* chore: init manualRelayToDestChain

* chore: pending work and disable husky

* feat: add `AxelarRecoveryApiClient`

* chore: add axelar recovery api urls

* chore: add createAxelarBroadcastClient

* feat: implement confirm step

* feat: implement sign tx flow

* feat: improve sign tx

* feat: implement route message

* chore: add signEvmTx to axelar-recovery client

* chore: implement signGatewayApprove tx

* chore: refactor error for each recovery step

* chore: fix build error

* chore: add retry

* chore: add built path to gitignore

* chore: returns early if fail to proceed

* docs(changeset): add tx recovery

* docs(changeset): Add a tx recovery feature

* feat: implement escapeAfterConfirm

* chore: make options optional

* chore: add tests

* chore: moving files and folders

* chore: check for tx status first

* chore: remove unnecessary check

* chore: fix checking finalized block issue

* chore: fix error msg

* chore: refactor recovery methods

* chore: add test for axelar confirm tx

* chore: add tests for axelarConfirmTx

* chore: remove unused import

* chore: add more assertion axelarConfirmTx

* chore: add tests for axelar sign tx

* chore: add evm gateway approve test

* chore: fix sign commands

* chore: remove execute tx signing from backend

* chore: remove unused import

* chore: remove the signEvmTx command from axelar-recovery api

* chore: move getWalletClient to common folder

* chore: use wallet client to sendRawTransaction

* chore: implement response mapping

* chore: fix build error

* chore: implement recovery tests

* chore: update isomorphic test

* chore: fix tests

* chore: fix tests

* chore: add messageId and txLogIndex to params

* chore: remove txEventIndex

* chore: fix import

* chore: skip manual test

* chore: fix test expect

* chore: uncomment husky

* chore: remove outdated changeset

* chore: add changeset

* chore: typo

* feat: add lcd urls to core package

* feat: add stargate connect function with fallback to other rpc urls

* chore: fix tests

* chore: update changeset

* chore: fix error in deposit address

* chore: fix wrong type

* chore: extract helper function 'shouldAbortRecovery'

* chore: separate actions and types for axelar txs

* chore: add more reasons to retry batch commands

* chore: added more tests and fix error

* chore: remove sign tx from evm to ibc

* chore: move batch commands query in sign commands inside try block

* chore: move batch commands query to the try block

* chore: remove undefined

* chore: apply changesets (#378)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: add query transaction status (#379)

* feat: implement queryTransactionStatus

* chore: update express_executed type

* chore: add tests

* docs(changeset): chore: add queryTransactionStatus to transaction-recovery package

* chore: update function doc

* feat: redesign (#377)

* feat: update colors

* feat: update colors

* feat: add clash grotesk font and set it as primary font

* feat: update font weights

* feat: update font weights ui package

* feat: animated bg

* feat: animated bg in ui package

* feat: mobile and light mode improvements

* feat: mobile and light mode improvements ui package

* fix: video bg on mobile

* fix: chain selector position on mobile

* fix: remove unused page and use tabs in deployments table

* fix: tabs position to match other pages

* fix: get deployments query

* fix: show theme selector in sidebar

* fix: text colors token page

---------

Co-authored-by: Santiago Giaccobasso <santigiacco@192.168.1.4>
Co-authored-by: Santiago Giaccobasso <santigiacco@192.168.0.104>
Co-authored-by: Santiago Giaccobasso <santigiacco@Santiagos-MacBook-Pro.local>

* chore: apply changesets (#381)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: fix type error (#383)

* chore: add dev guideline (#384)

* chore: apply changesets (#385)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: npty <78221556+npty@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Santiago Giaccobasso <santigiacco@192.168.1.4>
Co-authored-by: Santiago Giaccobasso <santigiacco@192.168.0.104>
Co-authored-by: Santiago Giaccobasso <santigiacco@Santiagos-MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants