Commit c300c2b
fix(api): use ContractEventPayload.log.transactionHash in base watcher
The ethers v6 contract.on() listener receives ContractEventPayload as
its last argument, not EventLog. Accessing event.transactionHash
returned undefined, which then propagated into db.getPaymentByTxHash
and triggered sql.js's "tried to bind a value of an unknown type
(undefined)" error — so live VpnPayment events were silently dropped
and payments never provisioned.
Switch the listener to read event.log.transactionHash. The catch-up
scanner was already correct (queryFilter returns EventLog), so on
restart it will retroactively pick up any events the live listener
missed within the 1000-block lookback window.
Also gitignore .test-wallet.json (local throwaway key file).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 98bad9f commit c300c2b
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
0 commit comments