mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Located bug.
Example output: from query: account: number = 4, sequence = 0 for signing: nonce: 0
This commit is contained in:
parent
ae1534896d
commit
95722a0495
@ -54,6 +54,8 @@ export class CosmosCodec implements TxCodec {
|
||||
}
|
||||
|
||||
public bytesToSign(unsigned: UnsignedTransaction, nonce: Nonce): SigningJob {
|
||||
console.log("nonce:", nonce);
|
||||
// ohhh... this is a bug!!!
|
||||
const accountNumber = 0;
|
||||
const memo = (unsigned as any).memo;
|
||||
const built = buildUnsignedTx(unsigned, this.tokens);
|
||||
|
@ -171,6 +171,7 @@ export class CosmosConnection implements BlockchainConnection {
|
||||
const address = isPubkeyQuery(query) ? pubkeyToAddress(query.pubkey, this.prefix) : query.address;
|
||||
const { result } = await this.restClient.authAccounts(address);
|
||||
const account = result.value;
|
||||
console.log(`account: number = ${account.account_number}, sequence = ${account.sequence}`);
|
||||
return parseInt(account.sequence, 10) as Nonce;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user