Unable to obtain account transaction - Assertion failed
Closed this issue · 1 comments
Deleted user commented
Hi, trying to obtain transactions for account, but I received AssertionError all the time.
AssertionError: Assertion failed
at new goog.asserts.AssertionError (/Projects/crypto/tatum-libra-client/node_modules/google-protobuf/google-protobuf.js:79:876)
at Object.goog.asserts.doAssertFailure_ (/Projects/crypto/tatum-libra-client/node_modules/google-protobuf/google-protobuf.js:80:257)
at Object.goog.asserts.assert (/Projects/crypto/tatum-libra-client/node_modules/google-protobuf/google-protobuf.js:81:83)
at jspb.BinaryWriter.writeBool (/Projects/crypto/tatum-libra-client/node_modules/google-protobuf/google-protobuf.js:351:392)
at proto.types.GetAccountTransactionBySequenceNumberRequest.serializeBinaryToWriter (/Projects/crypto/tatum-libra-client/node_modules/libra-core/build/__generated__/get_with_proof_pb.js:1280:16)
at jspb.BinaryWriter.writeMessage (/Projects/crypto/tatum-libra-client/node_modules/google-protobuf/google-protobuf.js:353:336)
at proto.types.RequestItem.serializeBinaryToWriter (/Projects/crypto/tatum-libra-client/node_modules/libra-core/build/__generated__/get_with_proof_pb.js:347:16)
at jspb.BinaryWriter.writeRepeatedMessage (/Projects/crypto/tatum-libra-client/node_modules/google-protobuf/google-protobuf.js:363:385)
at Function.proto.types.UpdateToLatestLedgerRequest.serializeBinaryToWriter (/Projects/crypto/tatum-libra-client/node_modules/libra-core/build/__generated__/get_with_proof_pb.js:158:16)
at proto.types.UpdateToLatestLedgerRequest.serializeBinary (/Projects/crypto/tatum-libra-client/node_modules/libra-core/build/__generated__/get_with_proof_pb.js:140:45)
What I call is simple:
@Injectable()
export class AppService {
private client: LibraClient;
constructor() {
this.client = new LibraClient({network: LibraNetwork.Testnet});
}
public async getAccountTransactions(address: string, sequence: number, events: boolean): Promise<LibraSignedTransactionWithProof> {
return this.client.getAccountTransaction(address, sequence, events);
}
}
Address of my account is 516fe9e7c88c6760894932973931c466a8f1ee2334e837a787f62d6cfa2dd83e - see here https://librabrowser.io/account/516fe9e7c88c6760894932973931c466a8f1ee2334e837a787f62d6cfa2dd83e.
Trying to obtain sequenceNumber 0 with fetchEvents true/false, does not matter.
Node v12
Typescript v3.5
NestJS
Deleted user commented
My fault, passed string instead of boolean to fetchEvents.