Skip to content

Commit

Permalink
ts: Use return value of wallet.signTransaction in provider.ts (#1527
Browse files Browse the repository at this point in the history
)
  • Loading branch information
robert-balcerowicz authored Mar 20, 2022
1 parent f0b4c38 commit 1c7139a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ incremented for features.
* ts: Fix `spl-token` coder account parsing ([#1604](https://github.com/project-serum/anchor/pull/1604)).
* cli: Fix `npm install` fallback if `yarn` install doesn't work ([#1643](https://github.com/project-serum/anchor/pull/1643)).
* lang: Fix bug where `owner = <target>` would not compile because of missing type annotation ([#1648](https://github.com/project-serum/anchor/pull/1648)).
* ts: Adjust `send` and `simulate` functions in `provider.ts`, so they use the return value of `Wallet.signTransaction`([#1527](https://github.com/project-serum/anchor/pull/1527)).

### Breaking

Expand Down
4 changes: 2 additions & 2 deletions ts/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class Provider {
await this.connection.getRecentBlockhash(opts.preflightCommitment)
).blockhash;

await this.wallet.signTransaction(tx);
tx = await this.wallet.signTransaction(tx);
signers
.filter((s): s is Signer => s !== undefined)
.forEach((kp) => {
Expand Down Expand Up @@ -197,7 +197,7 @@ export default class Provider {
)
).blockhash;

await this.wallet.signTransaction(tx);
tx = await this.wallet.signTransaction(tx);
signers
.filter((s): s is Signer => s !== undefined)
.forEach((kp) => {
Expand Down

0 comments on commit 1c7139a

Please sign in to comment.