Skip to content

Commit 7433aa3

Browse files
fix: use ctx param in call to Provider.Nonce (#797)
* fix: use ctx param in call to Provider.Nonce * chore: update changelog to reflect the change --------- Co-authored-by: thiagodeev <[email protected]>
1 parent cea2adc commit 7433aa3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
so the output of `TypedData.MarshalJSON()` is exactly as the original JSON.
3131
- Wrong encoding of the `selector` type in the `typedData` pkg for a specific case, when the value was already a hashed selector.
3232
More details in the PR [793](https://github.com/NethermindEth/starknet.go/pull/793).
33+
- Not using the provided `context.Context` in the `account.Nonce` method when calling the `rpc.Nonce` method.
3334

3435
### Dev updates
3536
- New `internal/tests/jsonrpc_spy.go` file containing a `Spy` type for spying JSON-RPC calls in tests. The

account/account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func NewAccount(
144144

145145
// Nonce retrieves the nonce for the account's contract address.
146146
func (account *Account) Nonce(ctx context.Context) (*felt.Felt, error) {
147-
return account.Provider.Nonce(context.Background(), rpc.WithBlockTag("pre_confirmed"), account.Address)
147+
return account.Provider.Nonce(ctx, rpc.WithBlockTag("pre_confirmed"), account.Address)
148148
}
149149

150150
// PrecomputeAccountAddress calculates the precomputed address for an account.

0 commit comments

Comments
 (0)