-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Send progress events from Host to Guest #10
Conversation
b1d4e93
to
8d6cd69
Compare
This PR is getting quite large (+ big scope) while implementing important core functionality. We need to make sure the code here is rock solid. We should try to merge this as soon as possible with a minimal feature set. Large PRs are hard to review. It's better to add more functionality later with new PRs. |
f86833f
to
9f46df0
Compare
@@ -29,6 +30,14 @@ export default function InitPage() { | |||
(state) => state.providers.selectedProvider, | |||
); | |||
|
|||
async function init() { | |||
await buyXmr( | |||
providerToConcatenatedMultiAddr(selectedProvider), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be called in buy_xmr instead.
src-gui/src/renderer/components/pages/history/table/HistoryRowActions.tsx
Outdated
Show resolved
Hide resolved
I think the last 9 commits or so are mostly a back and forth and can be squashed |
7c31c63
to
5dc8eb7
Compare
…ce Tauri events - Implement trait-based request handling in api/request.rs - Add Tauri bindings and event system in api/tauri_bindings.rs - Refactor CLI command parsing and execution in cli/command.rs - Update RPC methods to use new request handling approach - Emit Tauri events in swap/src/protocol/bob/swap.rs - Add typescript type bindings use typeshare crate
2b25782
to
88c7f11
Compare
- Replace Electron IPC with Tauri invoke() for API calls - Implement TauriSwapProgressEvent for state management - Remove IpcInvokeButton, replace with PromiseInvokeButton - Update models: new tauriModel.ts, refactor rpcModel.ts - Simplify SwapSlice state, remove processRunning flag - Refactor SwapStatePage to use TauriSwapProgressEvent - Update HistoryRow and HistoryRowActions for new data structures - Remove unused Electron-specific components (e.g., RpcStatusAlert) - Update dependencies: React 18, Material-UI v4 to v5 - Implement typeshare for Rust/TypeScript type synchronization - Add BobStateName enum for more precise swap state tracking - Refactor utility functions for Tauri compatibility - Remove JSONStream and other Electron-specific dependencies
d7e24df
to
349035d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -49,45 +33,52 @@ export default function SwapStatePage({ | |||
if (swapState === null) { | |||
return <InitPage />; | |||
} | |||
if (isSwapStateInitiated(swapState)) { | |||
if (swapState.type === "Initiated") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part might benefit from using switch case
- Use the Request trait introduced in #10 for the RPC server - Delegate deserialization of RPC server method parameters to serde by using structs like BuyXmrArgs - Remove `get_raw_states` RPC server method because it's not used - Fix RPC server tests including removing test for the "log reference id" feature which was removed as part of #10 - Rename GetCurrentSwap struct to GetCurrentSwapArgs
- Use the Request trait introduced in #10 for the RPC server - Delegate deserialization of RPC server method parameters to serde by using structs like BuyXmrArgs - Remove `get_raw_states` RPC server method because it's not used - Fix RPC server tests including removing test for the "log reference id" feature which was removed as part of #10 - Rename GetCurrentSwap struct to GetCurrentSwapArgs
- Use the Request trait introduced in #10 for the RPC server - Delegate deserialization of RPC server method parameters to serde by using structs like BuyXmrArgs - Remove `get_raw_states` RPC server method because it's not used - Fix RPC server tests including removing test for the "log reference id" feature which was removed as part of #10 - Rename GetCurrentSwap struct to GetCurrentSwapArgs
Before merging this we need to: