Conversation
| }, | ||
| }, | ||
| { | ||
| Name: "import-private-key", |
There was a problem hiding this comment.
| Name: "import-private-key", | |
| Name: "import", |
| if entry.IsDir() || entry.Name() == keep || !strings.HasSuffix(entry.Name(), ".json") { | ||
| continue | ||
| } | ||
| if err := os.Remove(filepath.Join(dir, entry.Name())); err != nil { |
There was a problem hiding this comment.
Do we really want to be wiping private keys? as far as i can tell this code wipes any its not immediately creating, no?
| return nil | ||
| } | ||
|
|
||
| func restartRemoteSigner(cfg *config.Config, id string, u *ui.UI) { |
There was a problem hiding this comment.
I imagine this is done to pick up changes.
Thinking ahead, to when maybe we want an agent to mess with wallets; they won't have kubeconfig access. should we consider fixing whatever reload this is working around on the remote-signer code side? so that when we don't have a kubeconfig to restart pods, we can still get the thing to work?
|
Context on this PR: The original bug is flow/test setup: flow-11 was letting Bob's remote-signer use a generated throwaway wallet, then funding that wallet. What we actually need is for Bob to use deterministic derived wallet #2, because that is the wallet the flow already funds/checks. That said, adding I think the right shape is:
I'm also checking whether flow-11 can be set up better by creating/provisioning Bob's desired wallet first, so this PR may not need as much user-facing wallet-import surface area. |
|
Follow-up from checking the flow setup: there is a cleaner shape that avoids replacing a live remote-signer wallet.
Preferred patch shape:
That would better match the original test need: create the correct wallet first, instead of creating a generated wallet and then replacing it. |



Summary
This PR fixes flow-11 so Bob buys with the already-funded second deterministic wallet instead of a generated throwaway remote-signer wallet.
Key changes:
obol openclaw wallet import-private-key <instance> --private-key-file ... --force.flow-11-dual-stack.shand assertbobSigner == BOB_WALLET.remote-signer-keystore-passwordSecret during wallet import/restore before restarting remote-signer.network add --endpoint ... --allow-writesRPCs so ERC-8004 transactions do not route to flaky built-ins.Flow
Validation
bash -n flows/flow-11-dual-stack.shgo test ./cmd/obol -run 'TestIsTransientRegistrationError|TestSellRegister_Flags|TestOpenClawWalletCommand_Structure' -count=1go test ./internal/openclaw ./internal/network -count=1go test ./...FLOW11_BASE_SEPOLIA_RPC=https://base-sepolia-rpc.publicnode.com ./flows/flow-11-dual-stack.shLive receipts from
.tmp/flow-11-20260424-230033/receipt-summary.json:51830xC0De030F6C37f490594F93fB99e2756703c4297E0x57b0eF875DeB5A37301F1640E469a2129Da9490E0x2a64bc1aeb27e077fef49e435b6349cca61ead598300e918c5cef8caebb5368f0xe43d773ae7cfe7fff3b79dded65c7d38e190bc02d61940c02673b9b12ad2696f0x9caf938393ef4b40bc6ff5817c4d620bb9847fef6ff72aac22ec113ad491f5169167000 -> 9168000micro-USDC, Bob signer4997000 -> 4996000micro-USDC