Skip to content

Commit

Permalink
chore: resolve comment
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyyconsensys committed Dec 10, 2024
1 parent 4699e07 commit 62429dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions packages/starknet-snap/src/utils/transaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
transactionVersionToNumber,
feeTokenToTransactionVersion,
transactionVersionToFeeToken,
transactionSelectorHexToName,
transactionSelectorToName,
isFundTransferEntrypoint,
} from './transaction';

Expand Down Expand Up @@ -94,11 +94,11 @@ describe('transactionVersionToFeeToken', () => {
);
});

describe('transactionSelectorHexToName', () => {
describe('transactionSelectorToName', () => {
it.each([TRANSFER_SELECTOR_HEX, 'transfer'])(
'converts selector name to `transfer` if it matchs the transfer selector - %s',
(selector: string) => {
expect(transactionSelectorHexToName(selector)).toStrictEqual(
expect(transactionSelectorToName(selector)).toStrictEqual(
ContractFuncName.Transfer,
);
},
Expand All @@ -107,7 +107,7 @@ describe('transactionSelectorHexToName', () => {
it.each([UPGRADE_SELECTOR_HEX, 'upgrade'])(
'converts selector name to `upgrade` if it matchs the upgrade selector - %s',
(selector: string) => {
expect(transactionSelectorHexToName(selector)).toStrictEqual(
expect(transactionSelectorToName(selector)).toStrictEqual(
ContractFuncName.Upgrade,
);
},
Expand All @@ -116,7 +116,7 @@ describe('transactionSelectorHexToName', () => {
it.each(['transfers', 'upgraded', '0x11234'])(
'returns the original selector string if it doesnt match the hex string for upgrade or transfer',
(selector: string) => {
expect(transactionSelectorHexToName(selector)).toStrictEqual(selector);
expect(transactionSelectorToName(selector)).toStrictEqual(selector);
},
);
});
Expand All @@ -137,7 +137,7 @@ describe('callsToTranscationAccountCalls', () => {
{
contract,
contractCallData,
contractFuncName: transactionSelectorHexToName(entrypoint),
contractFuncName: transactionSelectorToName(entrypoint),
},
],
});
Expand Down Expand Up @@ -183,7 +183,7 @@ describe('callsToTranscationAccountCalls', () => {
acc[contract].push({
contract,
contractCallData,
contractFuncName: transactionSelectorHexToName(entrypoint),
contractFuncName: transactionSelectorToName(entrypoint),
recipient: contractCallData[0],
amount: contractCallData[1],
});
Expand Down
2 changes: 1 addition & 1 deletion packages/starknet-snap/src/utils/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function callsToTranscationAccountCalls(
entrypoint,
} = call;

const contractFuncName = transactionSelectorHexToName(entrypoint);
const contractFuncName = transactionSelectorToName(entrypoint);

if (!Object.prototype.hasOwnProperty.call(acc, contract)) {
acc[contract] = [];
Expand Down

0 comments on commit 62429dc

Please sign in to comment.