mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
make sure we increment a number when working with nonces (#1781)
This commit is contained in:
parent
1bc5a39fda
commit
01248ff9a7
@ -83,7 +83,7 @@ export class Provider {
|
||||
signal?: AbortSignal,
|
||||
providerEndpoints?: any,
|
||||
serviceEndpoints?: ServiceEndpoint[]
|
||||
): Promise<string> {
|
||||
): Promise<number> {
|
||||
if (!providerEndpoints) {
|
||||
providerEndpoints = await this.getEndpoints(providerUri)
|
||||
}
|
||||
@ -102,7 +102,7 @@ export class Provider {
|
||||
})
|
||||
const { nonce } = await response.json()
|
||||
console.log(`[getNonce] Consumer: ${consumerAddress} nonce: ${nonce}`)
|
||||
const sanitizedNonce = !nonce || nonce === null ? '0' : nonce
|
||||
const sanitizedNonce = !nonce || nonce === null ? 0 : Number(nonce)
|
||||
return sanitizedNonce
|
||||
} catch (e) {
|
||||
LoggerInstance.error(e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user