iron-fish / node-app

Electron-based Node App
https://ironfish.network/use/node-app
17 stars 8 forks source link

Add RpcMemoryClient to AccountManager and replace route #410

Closed dguenther closed 12 months ago

dguenther commented 1 year ago

Adds an RpcMemoryClient to AccountManager and replaces the account renaming with an RPC call.

I think it'd be preferable to expose the RPC client directly to the frontend, but I wanted to try out what the interaction would be like between the frontend and the RPC layer. We could possibly go about refactoring to use the RPC Client by rewriting the Managers to use the RPC client, then exposing the RPC client to the frontend, then moving the manager code into the hooks on the frontend.

Of note, the RpcMemoryClient throws errors that have a codeMessage field, and that's usually what we'd want to display to users rather than Error.message.

As far as what will need to change in AccountManager to work with the RPC client instead, we'll want to prefer account names rather than the internal IDs to distinguish accounts. We'll also want to use different object types for accounts, since generally we won't have fields like the view keys unless exporting the account.

Fixes IFL-1699

vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated (UTC)
wallet-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2023 9:42pm
dguenther commented 12 months ago

Closing this in favor of a tRPC-based solution.