Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove the time field from the tx signature payload #144

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/wallet/types/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export interface TxSignPayload {
msgs: any[];
// the transaction memo
memo: string;
// signature generation time
time: string;
}

export const Secp256k1PubKeyType = '/tm.PubKeySecp256k1';
5 changes: 0 additions & 5 deletions src/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ export class Wallet {
await this.provider.getAccountSequence(address);
const publicKey: Uint8Array = await this.signer.getPublicKey();

// The timestamp for the signature needs to be set to "zero time"
// See https://github.com/gnolang/gno/issues/810
const defaultSigTimestamp = '0001-01-01T00:00:00Z';

// Create the signature payload
const signPayload: TxSignPayload = {
chain_id: chainID,
Expand All @@ -269,7 +265,6 @@ export class Wallet {
},
msgs: decodeTxMessages(tx.messages), // unrolled message objects
memo: tx.memo,
time: defaultSigTimestamp,
};

// The TM2 node does signature verification using
Expand Down