ts: Use return value of `wallet.signTransaction` in `provider.ts` (#1527)

This commit is contained in:
robert-balcerowicz 2022-03-20 19:11:41 +01:00 committed by GitHub
parent f0b4c385f3
commit 1c7139a9e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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) => {
@ -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) => {