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

Provider-table-patch #71

Merged
merged 2 commits into from
Apr 6, 2024
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: 1 addition & 1 deletion src.ts/providers/abstract-signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export abstract class AbstractSigner<P extends null | Provider = null | Provider
const txObj = Transaction.from(pop);

const signedTx = await this.signTransaction(txObj);
console.log("signedTX: ", JSON.stringify(txObj))
// console.log("signedTX: ", JSON.stringify(txObj))
return await provider.broadcastTransaction(shard, signedTx);
}

Expand Down
6 changes: 5 additions & 1 deletion src.ts/transaction/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "../utils/index.js";

import { accessListify } from "./accesslist.js";
import { computeAddress } from "./address.js";
import { computeAddress, recoverAddress } from "./address.js";

import type { BigNumberish, BytesLike } from "../utils/index.js";
import type { SignatureLike } from "../crypto/index.js";
Expand Down Expand Up @@ -144,6 +144,9 @@ function _parse(data: Uint8Array): TransactionLike {

tx.hash = getTransactionHash(tx, data);

// Compute the sender address since it's not included in the transaction
tx.from = recoverAddress(tx.hash, tx.signature!);

return tx;
}

Expand Down Expand Up @@ -595,6 +598,7 @@ export class Transaction implements TransactionLike<string> {
if (tx.from != null) {
// assertArgument(result.isSigned(), "unsigned transaction cannot define from", "tx", tx);
assertArgument(result.from.toLowerCase() === (tx.from || "").toLowerCase(), "from mismatch", "tx", tx);
result.from = tx.from;
}
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src.ts/utils/proto-decode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ function _decode(object: any): any {
}

export function decodeProto(object: Uint8Array): string{
console.log('Test decode')
// console.log('Test decode')
return _decode(object);
}
Loading