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

fix: fix the txn waiting bug #3540

Merged
merged 1 commit into from
Aug 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions ecosystem/typescript/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ All notable changes to the Aptos Node SDK will be captured in this file. This ch
**Note:** The Aptos TS SDK does not follow semantic version while we are in active development. Instead, breaking changes will be announced with each devnet cut. Once we launch our mainnet, the SDK will follow semantic versioning closely.

## Unreleased

N/A

## 1.3.8 (2022-08-25)
## 1.3.10 (2022-08-26)

- Fix the bug in `waitForTransactionWithResult`. When API returns `404`, the function should continue waiting rather than returning early. The reason is that the txn might not be committed promptly. `waitForTransactionWithResult` should either timeout or get an error in such case.

## 1.3.9 (2022-08-25)

- **[Breaking Change]** Reimplemented the JSON transaction submission interfaces with BCS. This is a breaking change. `createSigningMessage` is removed. Before the changes, the transaction payloads take string aruguments. But now, Typescript payload arguments have to match the smart contract arugment types. e.g. `number` matches `u8`, `number | bigint` matches `u64` and `u128`, etc.
- **[Breaking Change]** `getTokenBalance` and `getTokenBalanceForAccount` have been renamed to `getToken` and `getTokenForAccount`, since they were never getting just the balance, but the full token.
- Added `CoinClient` to help working with coins. This contains common operations such as `transfer`, `checkBalance`, etc.
- Added `generateSignSubmitWaitForTransaction`, a function that provides a simple way to execute the full end to end transaction submission flow. You may also leverage `generateSignSubmit`, a helper that does the same but without waiting, instead returning teh transaction hash.
- Added `fromDerivePath` to `AptosAccount`. You can use this to create an `AptosAccount` (which is a local representation of an account) using a bip44 path and mnemonics.


## 1.3.7 (2022-08-17)

- Add a transaction builder that is able to serialize transaction arguments with remote ABIs. Remote ABIs are fetchable through REST APIs. With the remote ABI transaction builder, developers can build BCS transactions by only providing the native JS values.
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/typescript/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
},
"version": "1.3.8"
"version": "1.3.10"
}
1 change: 0 additions & 1 deletion ecosystem/typescript/sdk/src/aptos_client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
TxnBuilderTypes,
TransactionBuilderMultiEd25519,
BCS,
TransactionBuilder,
TransactionBuilderRemoteABI,
} from "./transaction_builder";
import { TokenClient } from "./token_client";
Expand Down
3 changes: 2 additions & 1 deletion ecosystem/typescript/sdk/src/aptos_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ export class AptosClient {
if (e instanceof Gen.ApiError) {
if (e.status === 404) {
isPending = true;
break;
// eslint-disable-next-line no-continue
continue;
}
if (e.status >= 400) {
throw e;
Expand Down