Skip to content

Commit

Permalink
chore: remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
keiff3r committed May 17, 2024
1 parent 7decef2 commit 35a8f9c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
14 changes: 0 additions & 14 deletions src/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ export const splitPath = (path: string): number[] => {

export const pathToBuffer = (originalPath: string): Buffer => {
const path = originalPath;
// .split("/")
// .map((value) =>
// value.endsWith("'") || value.endsWith("h") ? value : value + "'"
// )
// .join("/");
const pathNums: number[] = BIPPath.fromString(path).toPathArray();
return serializePath(pathNums);
};
Expand Down Expand Up @@ -219,24 +214,15 @@ export const serializeKlaytnTransaction = (
chainId: BigNumber;
chainIdTruncated: number;
} => {
// const commonRlpSig = txn.getCommonRLPEncodingForSignature();

const rlpSig = txn.getRLPEncodingForSignature();

// const getRawTx = txn.getRawTransaction();

// const rlp = txn.getRLPEncoding()

// const decoded = caver.transaction.valueTransfer.decode(commonRlpSig)

// const rlpEncoded = rlpEncodeForValueTransfer(txn)
const rawTx = Buffer.from(rlpSig.slice(2), "hex");

const { vrsOffset, txType, chainId, chainIdTruncated } = decodeTxInfo(
rawTx,
txn.type
);
// const getRawTxBuffer = Buffer.from(getRawTx.slice(2), "hex")
const payloads = serializeTransactionPayloads(path, rawTx, vrsOffset);

return { payloads, txType, chainId, chainIdTruncated };
Expand Down
1 change: 0 additions & 1 deletion tests/Klaytn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ test("signSmartContractDeploy with display", async () => {
chainId: CHAIN_ID,
input: "0x6080604052600560005534801561001557600080fd5b5060405161029c38038061029c8339818101604052810190610037919061007f565b80600081905550506100ac565b600080fd5b6000819050919050565b61005c81610049565b811461006757600080fd5b50565b60008151905061007981610053565b92915050565b60006020828403121561009557610094610044565b5b60006100a38482850161006a565b91505092915050565b6101e1806100bb6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630dbe671f14610046578063d732d95514610064578063e8927fbc1461006e575b600080fd5b61004e610078565b60405161005b91906100d7565b60405180910390f35b61006c61007e565b005b6100766100a3565b005b60005481565b60008054146100a15760016000808282546100999190610121565b925050819055505b565b60016000808282546100b59190610155565b92505081905550565b6000819050919050565b6100d1816100be565b82525050565b60006020820190506100ec60008301846100c8565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061012c826100be565b9150610137836100be565b92508282101561014a576101496100f2565b5b828203905092915050565b6000610160826100be565b915061016b836100be565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156101a05761019f6100f2565b5b82820190509291505056fea264697066735822122011473ea0fe0dcd65952f4315de5458369b91cb3a2f53790f0906775227a6070c64736f6c634300080f00330000000000000000000000000000000000000000000000000000000000000001",
});
// const caverSig = await signTransactionWithCaver(txnToSign);
await performSigningAndValidation(
[
"e006008015058000002c80002019800000000000000000000000",
Expand Down

0 comments on commit 35a8f9c

Please sign in to comment.