Use rpc.account.nextIndex in submittables (#1422)
This commit is contained in:
@@ -193,7 +193,9 @@ export default class Submittable<ApiType> extends _Extrinsic implements Submitta
|
||||
return combineLatest([
|
||||
// if we have a nonce already, don't retrieve the latest, use what is there
|
||||
isUndefined(options.nonce)
|
||||
? this._api.query.system.accountNonce<Index>(address)
|
||||
? this._api.rpc.account.nextIndex
|
||||
? this._api.rpc.account.nextIndex(address)
|
||||
: this._api.query.system.accountNonce(address)
|
||||
: of(createType('Index', options.nonce)),
|
||||
// if we have an era provided already or eraLength is <= 0 (immortal)
|
||||
// don't get the latest block, just pass null, handle in mergeMap
|
||||
|
||||
Reference in New Issue
Block a user