@@ -91,10 +91,12 @@ export function all (api: ApiInterfaceRx): (address: AccountIndex | AccountId |
|
||||
of(accountId),
|
||||
bestNumber(api)(),
|
||||
queryBalances(api, accountId),
|
||||
api.rpc.account && api.rpc.account.nextIndex
|
||||
? api.rpc.account.nextIndex(accountId)
|
||||
// otherwise we end up with this: type 'Codec | Index' is not assignable to type 'Index'.
|
||||
: api.query.system.accountNonce<Index>(accountId)
|
||||
// FIXME This is having issues with Kusama, only use accountNonce atm
|
||||
// api.rpc.account && api.rpc.account.nextIndex
|
||||
// ? api.rpc.account.nextIndex(accountId)
|
||||
// // otherwise we end up with this: type 'Codec | Index' is not assignable to type 'Index'.
|
||||
// : api.query.system.accountNonce<Index>(accountId)
|
||||
api.query.system.accountNonce<Index>(accountId)
|
||||
])
|
||||
: of([createType('AccountId'), createType('BlockNumber'), [createType('Balance'), createType('Balance'), createType('Vec<BalanceLock>'), createType('Option<VestingSchedule>', null)], createType('Index')])
|
||||
)
|
||||
|
||||
@@ -193,9 +193,12 @@ 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.rpc.account.nextIndex
|
||||
? this._api.rpc.account.nextIndex(address)
|
||||
: this._api.query.system.accountNonce(address)
|
||||
// FIXME This apparently is having issues on latest Kusama for nonce retrieval,
|
||||
// hence we are using the accountNonce only
|
||||
// ? this._api.rpc.account.nextIndex
|
||||
// ? this._api.rpc.account.nextIndex(address)
|
||||
// : this._api.query.system.accountNonce(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