-
Notifications
You must be signed in to change notification settings - Fork 985
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
add integration test for send #18910
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
|
||
(def account-name "account-abc") | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. el |
||
|
||
(def recovery-account | ||
{:name "wallet-abc" | ||
:seed-phrase "destroy end torch puzzle develop note wise island disease chaos kind bus" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
[accounts] | ||
(first (filter :wallet accounts))) | ||
|
||
(def send-amount "0.00001") | ||
(def send-amount "0.0001") | ||
|
||
(deftest wallet-send-test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is one of the main focuses of this pr. 🦅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems good @J-Son89 I'd like to have a clearer way to read it, but it seems the re-frame's macro Looking at the implementation of that macro, it returns: ;; ...
(wait-for* ~ids ~failure-ids (fn [~event-sym] ~@body)) and @ilmotta wdyt? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah the wait for makes it ugly to write too. one other feature that would be nice, often we want to wait on multiple keys and in order, but we don't support this. we can only wait for multiple but once one is satisfied then it moves forward |
||
(h/log-headline :wallet-send-test) | ||
|
@@ -38,13 +38,14 @@ | |
:receipient address | ||
:stack-id :wallet-select-address}]) | ||
(let [filtered-tokens (rf/sub [:wallet/tokens-filtered "eth"])] | ||
|
||
(rf/dispatch [:wallet/send-select-token | ||
{:token (first filtered-tokens) | ||
:stack-id :wallet-select-asset}]) | ||
(rf-test/wait-for | ||
[:wallet/clean-suggested-routes] | ||
(rf/dispatch | ||
[:wallet/get-suggested-routes send-amount])) | ||
[:wallet/get-suggested-routes {:amount send-amount}])) | ||
(rf-test/wait-for | ||
[:wallet/suggested-routes-success] | ||
(let [route (rf/sub [:wallet/wallet-send-route])] | ||
|
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.
copied from @ilmotta's pr
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.
Sorry it took me a while to merge because I thought I had it in. You should be able to rebase with the fix now.