|
|
@ -162,7 +162,6 @@ class Account { |
|
|
|
async updateBalances(blockNumber: string = 'latest'): Promise<void> { |
|
|
|
async updateBalances(blockNumber: string = 'latest'): Promise<void> { |
|
|
|
// this.messenger.setShardingProviders();
|
|
|
|
// this.messenger.setShardingProviders();
|
|
|
|
const shardProviders = this.messenger.shardProviders; |
|
|
|
const shardProviders = this.messenger.shardProviders; |
|
|
|
|
|
|
|
|
|
|
|
if (shardProviders.size > 1) { |
|
|
|
if (shardProviders.size > 1) { |
|
|
|
for (const [name, val] of shardProviders) { |
|
|
|
for (const [name, val] of shardProviders) { |
|
|
|
const balanceObject = await this.getShardBalance(val.shardID, blockNumber); |
|
|
|
const balanceObject = await this.getShardBalance(val.shardID, blockNumber); |
|
|
@ -248,12 +247,14 @@ class Account { |
|
|
|
this.messenger.chainPrefix, |
|
|
|
this.messenger.chainPrefix, |
|
|
|
shardID, |
|
|
|
shardID, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const nonce = await this.messenger.send( |
|
|
|
const nonce = await this.messenger.send( |
|
|
|
RPCMethod.GetTransactionCount, |
|
|
|
RPCMethod.GetTransactionCount, |
|
|
|
[this.address, blockNumber], |
|
|
|
[this.address, blockNumber], |
|
|
|
this.messenger.chainPrefix, |
|
|
|
this.messenger.chainPrefix, |
|
|
|
shardID, |
|
|
|
shardID, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (balance.isError()) { |
|
|
|
if (balance.isError()) { |
|
|
|
throw balance.error.message; |
|
|
|
throw balance.error.message; |
|
|
|
} |
|
|
|
} |
|
|
|