Skip to content

Conversation

@ape-dev-cs
Copy link
Contributor

@ape-dev-cs ape-dev-cs commented Mar 16, 2025

What it solves

Does transaction name / parameter guessing locally based on a DB. Branches off of the walletconnect branch so that needs to go in first.

Resolves #
#20

How this PR fixes it

Has a database of files that map function signatures to function names, then uses ethers to decode them. Currently files are local on my machine, but will be stuck on IPFS at some point. Falls back to abi-guesser if it fails. Note this branch won't work locally until files are non-local and on IPFS.

How to test it

Connect walletconnect, send a TX, if it decodes the TX correctly

Screenshots

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

@vercel
Copy link

vercel bot commented Mar 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wallet ❌ Failed (Inspect) May 10, 2025 4:02pm

@github-actions
Copy link

github-actions bot commented Mar 16, 2025

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🟡 Statements
74.6% (+0.53% 🔼)
5741/7696
🔴 Branches
52.01% (+1.88% 🔼)
1280/2461
🔴 Functions
57.18% (+1.5% 🔼)
864/1511
🟡 Lines
76.74% (+0.59% 🔼)
5128/6682
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / settingsSlice.ts
42.65% (-8.26% 🔻)
28.57% (-21.43% 🔻)
25% (-10% 🔻)
40.38% (-8.4% 🔻)
🟡
... / sdk.ts
66.29% (-2.25% 🔻)
27.78%
63.64% (-9.09% 🔻)
66.25% (-1.25% 🔻)
🔴 src/utils/hex.ts
15.79% (-84.21% 🔻)
0% (-100% 🔻)
0% (-100% 🔻)
23.08% (-76.92% 🔻)
🟡
... / safeTheme.ts
76.19% (-2.38% 🔻)
50%
68.97% (-3.45% 🔻)
77.5% (-2.5% 🔻)
🟢
... / hooks.ts
86.54%
48.57% (-2.86% 🔻)
83.33% 91.01%
🟢
... / index.tsx
100%
94.59% (-2.7% 🔻)
100% 100%
🟢
... / index.tsx
95% (-5% 🔻)
43.48% (-4.35% 🔻)
100% 100%
🔴
... / SafeTxProvider.tsx
28.57% 0%
0% (-22.22% 🔻)
29.17%
🟢
... / ExecuteForm.tsx
98% (-2% 🔻)
86.36% 100% 100%
🔴
... / useIsValidExecution.ts
46.67%
16.67% (-8.33% 🔻)
40% 47.62%
🟡
... / useGasLimit.ts
78.26%
29.41% (-5.88% 🔻)
62.5% 77.27%
🟢
... / SignForm.tsx
94.74% (-2.63% 🔻)
92.31% 100% 100%
🔴
... / useNameResolver.ts
33.33% (-47.62% 🔻)
0% (-50% 🔻)
0% (-75% 🔻)
38.89% (-44.44% 🔻)

Test suite run failed

Failed tests: 0/749. Failed suites: 3/120.
  ● Test suite failed to run


      x Expression expected
         ,-[/home/runner/work/wallet/wallet/src/utils/hash-lookup.ts:421:1]
     421 |     return null
     422 |   }
     423 | }
     424 | }
         : ^
         `----


    Caused by:
        Syntax Error



      at Object.transformSync (node_modules/next/src/build/swc/index.ts:1290:25)
      at transformSync (node_modules/next/src/build/swc/index.ts:1409:19)
      at Object.process (node_modules/next/src/build/swc/jest-transformer.ts:103:25)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19)
      at Object.<anonymous> (src/hooks/useDecodeTx.ts:1971:27)
      at Object.<anonymous> (src/components/tx/SignOrExecuteForm/index.tsx:2138:67)
      at Object.<anonymous> (src/components/tx/SignOrExecuteForm/__tests__/SignOrExecute.test.tsx:6:28)


  ● Test suite failed to run


      x Expression expected
         ,-[/home/runner/work/wallet/wallet/src/utils/hash-lookup.ts:421:1]
     421 |     return null
     422 |   }
     423 | }
     424 | }
         : ^
         `----


    Caused by:
        Syntax Error



      at Object.transformSync (node_modules/next/src/build/swc/index.ts:1290:25)
      at transformSync (node_modules/next/src/build/swc/index.ts:1409:19)
      at Object.process (node_modules/next/src/build/swc/jest-transformer.ts:103:25)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19)
      at Object.<anonymous> (src/hooks/useDecodeTx.ts:1971:27)
      at Object.<anonymous> (src/components/tx/SignOrExecuteForm/index.tsx:2138:67)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/ReviewTokenTransfer.tsx:665:66)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/ReviewTokenTx.tsx:379:65)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/index.tsx:861:67)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/__tests__/CreateTokenTransfer.test.tsx:6:24)


  ● Test suite failed to run


      x Expression expected
         ,-[/home/runner/work/wallet/wallet/src/utils/hash-lookup.ts:421:1]
     421 |     return null
     422 |   }
     423 | }
     424 | }
         : ^
         `----


    Caused by:
        Syntax Error



      at Object.transformSync (node_modules/next/src/build/swc/index.ts:1290:25)
      at transformSync (node_modules/next/src/build/swc/index.ts:1409:19)
      at Object.process (node_modules/next/src/build/swc/jest-transformer.ts:103:25)
      at ScriptTransformer.transformSource (node_modules/@jest/transform/build/ScriptTransformer.js:545:31)
      at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:674:40)
      at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:726:19)
      at Object.<anonymous> (src/hooks/useDecodeTx.ts:1971:27)
      at Object.<anonymous> (src/components/tx/SignOrExecuteForm/index.tsx:2138:67)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/ReviewTokenTransfer.tsx:665:66)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/ReviewTokenTx.tsx:379:65)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/index.tsx:861:67)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/SpendingLimitRow/index.tsx:661:27)
      at Object.<anonymous> (src/components/tx-flow/flows/TokenTransfer/CreateTokenTransfer.tsx:1273:66)
      at Object.<anonymous> (src/components/common/TokenAmountInput/index.tsx:1084:27)
      at Object.<anonymous> (src/components/tx-flow/flows/NewSpendingLimit/CreateSpendingLimit.tsx:1031:66)
      at Object.<anonymous> (src/components/tx-flow/flows/NewSpendingLimit/__tests__/SpendingLimitForm.test.ts:5:30)

Report generated by 🧪jest coverage report action from dc575ba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants