feat: update EIP 5792 implementation to match updated standard #11025
Test suite run failed
Failed tests: 4/1422. Failed suites: 1/198.
Details
Created failed tests' annotations. To disable them, see documentation.
● SafeWalletProvider › EIP-5792 › wallet_sendFunctionCallBundle › should send a bundle
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"params": {"safeTxGas": 0}, "txs": [{"data": "0x123", "gas": 1000, "to": "0x123", "value": "0x123"}, {"data": "0x456", "gas": 1000, "to": "0x789", "value": "0x1"}]}, {"description": "test", "iconUrl": "test", "id": 1, "name": "test", "url": "test"}
Number of calls: 0
516 | await safeWalletProvider.request(1, { method: 'wallet_sendFunctionCallBundle', params } as any, appInfo)
517 |
> 518 | expect(sdk.send).toHaveBeenCalledWith(
| ^
519 | {
520 | txs: params[0].calls,
521 | params: { safeTxGas: 0 },
at Object.toHaveBeenCalledWith (src/services/safe-wallet-provider/index.test.ts:518:26)
● SafeWalletProvider › EIP-5792 › wallet_getBundleStatus › should look up a tx by txHash
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "0x123"
Number of calls: 0
552 | await safeWalletProvider.request(1, { method: 'wallet_getBundleStatus', params } as any, appInfo)
553 |
> 554 | expect(sdk.getBySafeTxHash).toHaveBeenCalledWith(params[0])
| ^
555 | expect(sdk.proxy).toHaveBeenCalledWith('eth_getTransactionReceipt', params)
556 | })
557 |
at Object.toHaveBeenCalledWith (src/services/safe-wallet-provider/index.test.ts:554:37)
● SafeWalletProvider › EIP-5792 › wallet_getBundleStatus › should return a pending status w/o txHash
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "0x123"
Number of calls: 0
574 | await safeWalletProvider.request(1, { method: 'wallet_getBundleStatus', params } as any, appInfo)
575 |
> 576 | expect(sdk.getBySafeTxHash).toHaveBeenCalledWith(params[0])
| ^
577 | expect(sdk.proxy).not.toHaveBeenCalled()
578 | })
579 | })
at Object.toHaveBeenCalledWith (src/services/safe-wallet-provider/index.test.ts:576:37)
● SafeWalletProvider › EIP-5792 › wallet_showBundleStatus › should return the bundle status
expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "0x123"
Number of calls: 0
590 | await safeWalletProvider.request(1, { method: 'wallet_showBundleStatus', params } as any, appInfo)
591 |
> 592 | expect(sdk.showTxStatus).toHaveBeenCalledWith(params[0])
| ^
593 | })
594 | })
595 | })
at Object.toHaveBeenCalledWith (src/services/safe-wallet-provider/index.test.ts:592:34)
Annotations
Check failure on line 499 in src/services/safe-wallet-provider/index.test.ts
github-actions / Tests annotations (🧪 jest-coverage-report-action)
SafeWalletProvider > EIP-5792 > wallet_sendFunctionCallBundle > should send a bundle
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: {"params": {"safeTxGas": 0}, "txs": [{"data": "0x123", "gas": 1000, "to": "0x123", "value": "0x123"}, {"data": "0x456", "gas": 1000, "to": "0x789", "value": "0x1"}]}, {"description": "test", "iconUrl": "test", "id": 1, "name": "test", "url": "test"}
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/services/safe-wallet-provider/index.test.ts:518:26)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 535 in src/services/safe-wallet-provider/index.test.ts
github-actions / Tests annotations (🧪 jest-coverage-report-action)
SafeWalletProvider > EIP-5792 > wallet_getBundleStatus > should look up a tx by txHash
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "0x123"
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/services/safe-wallet-provider/index.test.ts:554:37)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 558 in src/services/safe-wallet-provider/index.test.ts
github-actions / Tests annotations (🧪 jest-coverage-report-action)
SafeWalletProvider > EIP-5792 > wallet_getBundleStatus > should return a pending status w/o txHash
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "0x123"
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/services/safe-wallet-provider/index.test.ts:576:37)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 582 in src/services/safe-wallet-provider/index.test.ts
github-actions / Tests annotations (🧪 jest-coverage-report-action)
SafeWalletProvider > EIP-5792 > wallet_showBundleStatus > should return the bundle status
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)
Expected: "0x123"
Number of calls: 0
at Object.toHaveBeenCalledWith (/home/runner/work/safe-wallet-web/safe-wallet-web/src/services/safe-wallet-provider/index.test.ts:592:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)