Skip to content
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

WiP: Imported tokens form #5256

Closed
wants to merge 172 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
40488ec
New const MAX_IMPORTED_TOKENS
mstrasinskis Jul 28, 2024
c79717e
New imported tokens services
mstrasinskis Jul 28, 2024
da6ad8f
Comments
mstrasinskis Jul 28, 2024
503c294
refactro: addImportedToken
mstrasinskis Jul 28, 2024
ef1593b
Test loadImportedTokens
mstrasinskis Jul 28, 2024
015346f
refactor: error messages
mstrasinskis Jul 28, 2024
3d49dee
refactor: testError
mstrasinskis Jul 28, 2024
1e36698
Test addImportedToken
mstrasinskis Jul 28, 2024
09e3c30
refactor: split addImportedToken
mstrasinskis Jul 28, 2024
2740b47
New removeImportedToken service
mstrasinskis Jul 28, 2024
91c476d
refactor: error/success messages
mstrasinskis Jul 28, 2024
c913361
test success toast
mstrasinskis Jul 28, 2024
c679bde
Test removeImportedToken
mstrasinskis Jul 28, 2024
ed0ea9d
Merge branch 'main' into mstr/imported-tokens-services
mstrasinskis Jul 28, 2024
9af3859
Fix typo
mstrasinskis Jul 28, 2024
2fa54de
Comments
mstrasinskis Jul 28, 2024
7a390f4
Merge branch 'mstr/imported-tokens-services' of https://github.com/df…
mstrasinskis Jul 28, 2024
70cece1
Todo added
mstrasinskis Jul 29, 2024
a3bc1da
Add ImportTokenWarning
mstrasinskis Jul 18, 2024
0b30654
Prop "required" for PrincipalInput
mstrasinskis Jul 18, 2024
c97d4e3
New labels
mstrasinskis Jul 18, 2024
57dce25
ImportTokenForm component base
mstrasinskis Jul 18, 2024
f8fa6c5
Dispatch nnsSubmit from ImportTokenForm
mstrasinskis Jul 18, 2024
a0c299f
New ImportTokenModal component with basic validation
mstrasinskis Jul 18, 2024
ca474b3
Add `import-token-validation` busy initiator type
mstrasinskis Jul 18, 2024
fdf850e
Busy screen text
mstrasinskis Jul 18, 2024
aa4e143
Add LinkIcon component
mstrasinskis Jul 18, 2024
594c776
Add ImportTokenCanisterId component
mstrasinskis Jul 18, 2024
f1064ea
Add ImportTokenReview component
mstrasinskis Jul 18, 2024
58941d8
Change index_label_optional label
mstrasinskis Jul 18, 2024
0cab007
Display ImportTokenReview in modal
mstrasinskis Jul 18, 2024
0d857d2
Show modal on import token click
mstrasinskis Jul 18, 2024
dc327ea
Load imported tokens on app init
mstrasinskis Jul 29, 2024
5bdbc4c
Add fetchIcrcToken service
mstrasinskis Jul 18, 2024
56d9f4a
cleanup: remove step 3
mstrasinskis Jul 29, 2024
5f7e87d
Merge branch 'main' into mstr/imported-tokens-form
mstrasinskis Jul 29, 2024
19ac08e
Add missing imported tokens api types
mstrasinskis Jul 29, 2024
9fd1e63
clean: imports
mstrasinskis Jul 29, 2024
73c9a29
Load imported tokens on dapp init
mstrasinskis Jul 29, 2024
58a3665
cleanup: remove step 3 config
mstrasinskis Jul 29, 2024
de2e2e8
feat: adding imported token on confirm
mstrasinskis Jul 29, 2024
fb7ffeb
refactor: use a single link_to_canister
mstrasinskis Jul 29, 2024
7c7a7eb
Remove where_to_find_href
mstrasinskis Jul 29, 2024
29415bf
Comments
mstrasinskis Jul 29, 2024
eff83c3
Remove unused labels
mstrasinskis Jul 29, 2024
be035e9
refactro: rename fetchIcrcTokenMetaData
mstrasinskis Jul 29, 2024
e306495
cleanup: imports
mstrasinskis Jul 29, 2024
2146d13
Add more testIds
mstrasinskis Jul 30, 2024
6d1273b
Merge branch 'main' into mstr/imported-tokens-form
mstrasinskis Jul 31, 2024
460bd3e
feat: propagate more props from PrincipalInput
mstrasinskis Jul 31, 2024
09ccd99
New component ImportTokenForm
mstrasinskis Jul 31, 2024
f793680
Update labels
mstrasinskis Jul 31, 2024
5e3f2eb
New busy store initiator
mstrasinskis Jul 31, 2024
77d3b20
feat: fetchIcrcTokenMetaData service
mstrasinskis Jul 31, 2024
73e8970
New component ImportTokenReview
mstrasinskis Jul 31, 2024
e988727
New component ImportTokenModal
mstrasinskis Jul 31, 2024
ffecb60
feat: display the modal on import token click
mstrasinskis Jul 31, 2024
4a703e4
Remove unused labels
mstrasinskis Jul 31, 2024
020fbfd
Update labels
mstrasinskis Jul 31, 2024
97e1b2f
test: fetchIcrcTokenMetaData service
mstrasinskis Jul 31, 2024
f2eb3cf
test: ImportTokenForm
mstrasinskis Jul 31, 2024
fce3f17
test: add testId prop to ImportTokenCanisterId
mstrasinskis Jul 31, 2024
85857db
test: add testId prop to ImportTokenCanisterId
mstrasinskis Jul 31, 2024
2cd4ee9
cleanup: remove redundant fn
mstrasinskis Jul 31, 2024
d1a7511
test: ImportTokenReview.spec
mstrasinskis Jul 31, 2024
466b863
test: ImportTokenModal
mstrasinskis Jul 31, 2024
8089ff1
test: error and fallback handling
mstrasinskis Jul 31, 2024
0fe010a
test: should open import token modal
mstrasinskis Jul 31, 2024
033ec97
test: should stay on step1 when error
mstrasinskis Jul 31, 2024
4439154
Comment
mstrasinskis Jul 31, 2024
ca77365
Restore missing labels
mstrasinskis Jul 31, 2024
bdccf5e
Merge branch 'mstr/imported-tokens-modal-1' into mstr/imported-tokens…
mstrasinskis Aug 1, 2024
e3b3407
Fix labels
mstrasinskis Aug 1, 2024
2276bf7
Fix labels
mstrasinskis Aug 1, 2024
3017df1
feat: save imported token after user confirmation
mstrasinskis Aug 1, 2024
1d23c65
feat: make indexCanisterId optional for IcrcCanistersStore
mstrasinskis Aug 1, 2024
fa0c66a
feat: Add imported tokens to the icrcCanistersStore
mstrasinskis Aug 1, 2024
20dd1cf
Fix importing label
mstrasinskis Aug 1, 2024
0b15e4b
feat: navigate to imported token after saving
mstrasinskis Aug 1, 2024
f318528
feat: table sort with imported tokens support
mstrasinskis Aug 1, 2024
cd0aba6
feat: display imported token tag
mstrasinskis Aug 1, 2024
18708f0
feat: isImportedToken util
mstrasinskis Aug 1, 2024
84628e2
refactor: use isImportedToken for tag
mstrasinskis Aug 1, 2024
552588e
feat: display imported token tag on wallet page
mstrasinskis Aug 1, 2024
81cf849
cleanup: remove redundant named slot
mstrasinskis Aug 1, 2024
09d4887
Revert "cleanup: remove redundant named slot"
mstrasinskis Aug 1, 2024
e6a769d
Revert "feat: display imported token tag on wallet page"
mstrasinskis Aug 1, 2024
dfb9e8a
feat: display tag in the wallet page header
mstrasinskis Aug 1, 2024
07fa9be
feat: remove imported token (basic version, separate button)
mstrasinskis Aug 1, 2024
1f57673
chore: formatting
mstrasinskis Aug 1, 2024
9d6ca11
fix: update i18n types
mstrasinskis Aug 1, 2024
4654cc0
test: fix compareTokensByImportance arguments
mstrasinskis Aug 1, 2024
234b0d4
test: adjust "should not show errors if loading accounts fails" test
mstrasinskis Aug 1, 2024
03a0b69
chore: remove log
mstrasinskis Aug 1, 2024
0179f68
! ENABLE ENABLE_IMPORT_TOKEN FLAG !
mstrasinskis Aug 1, 2024
9164fcf
Temporary suppress load imported tokens error toast
mstrasinskis Aug 1, 2024
ada4b18
Temporary suppress load imported tokens error toast
mstrasinskis Aug 1, 2024
19515ae
Temporary suppress load imported tokens error toast
mstrasinskis Aug 1, 2024
ac5947d
Revert "Temporary suppress load imported tokens error toast"
mstrasinskis Aug 4, 2024
c23a67c
Revert "Temporary suppress load imported tokens error toast"
mstrasinskis Aug 4, 2024
ce4a311
Revert "Temporary suppress load imported tokens error toast"
mstrasinskis Aug 4, 2024
4c3ba34
Revert "! ENABLE ENABLE_IMPORT_TOKEN FLAG !"
mstrasinskis Aug 4, 2024
d496799
feat: compareTokensByImportance comparator
mstrasinskis Aug 5, 2024
5c58c17
refactor: tokenWithBalance mock function to have id
mstrasinskis Aug 5, 2024
eb50ce1
test: compareTokensWithBalanceOrImportedFirst
mstrasinskis Aug 5, 2024
ee63a31
Remove compareTokensWithBalanceFirst
mstrasinskis Aug 5, 2024
ae8918a
feat: handle import token error
mstrasinskis Aug 6, 2024
201ab7a
test: createTokenWithBalance util
mstrasinskis Aug 6, 2024
7b2714b
test: should display imported tokens after important with balance
mstrasinskis Aug 6, 2024
f52928f
refactor: don't export createTokenWithBalance
mstrasinskis Aug 6, 2024
06e5be2
Expose testId and require props for PrincipaInput component
mstrasinskis Aug 8, 2024
37106ed
Update labels
mstrasinskis Aug 8, 2024
ac57c9c
New ImportTokenForm component
mstrasinskis Aug 8, 2024
de7ed16
New ImportTokenModal component
mstrasinskis Aug 8, 2024
245d914
feat: show modal on "Import token" button click
mstrasinskis Aug 8, 2024
3626af1
Change form test id
mstrasinskis Aug 8, 2024
11b2456
Move the import label
mstrasinskis Aug 8, 2024
0342a7d
test: ImportTokenForm
mstrasinskis Aug 8, 2024
4999d60
test: ImportTokenModal
mstrasinskis Aug 8, 2024
2f08c99
test: open import token modal
mstrasinskis Aug 8, 2024
a4a01be
Remove redundant label
mstrasinskis Aug 8, 2024
737fae4
refactor: rename disable
mstrasinskis Aug 9, 2024
61f00fe
Formatting
mstrasinskis Aug 9, 2024
b6b56db
upgrade ic-js
mstrasinskis Aug 9, 2024
31d7bd0
Index/Ledger canister IDs validation (getLedgerId)
mstrasinskis Aug 9, 2024
81d51fb
npm upgrade:gix to local
mstrasinskis Aug 11, 2024
aac6604
New LinkToDashboard component
mstrasinskis Aug 12, 2024
fc7b223
Add slot actions to WalletPageHeader
mstrasinskis Aug 12, 2024
e347217
Display link to dashboard popover on nns wallet page
mstrasinskis Aug 12, 2024
8a06ea9
Display link to dashboard popover on icrc wallet page
mstrasinskis Aug 12, 2024
d0bef16
Formatting
mstrasinskis Aug 12, 2024
c283cb7
Use LinkToDashboard instead of LinkIcon in ImportTokenCanisterId comp…
mstrasinskis Aug 12, 2024
ffb2312
Merge branch 'mstr/imported-tokens-modal' into mstr/imported-tokens-form
mstrasinskis Aug 13, 2024
6f092a4
reset package lock
mstrasinskis Aug 13, 2024
75cfd53
cleanup
mstrasinskis Aug 13, 2024
a49f1b2
Merge branch 'main' into mstr/imported-tokens-form
mstrasinskis Aug 13, 2024
3e5f876
cleanup
mstrasinskis Aug 13, 2024
ffb6bfa
New const IMPORTANT_CK_TOKEN_IDS
mstrasinskis Aug 14, 2024
9ce3fe6
Import token validation before review
mstrasinskis Aug 14, 2024
ad478a6
Do not show import buttons before the imported tokens are loaded
mstrasinskis Aug 14, 2024
c8917a5
Squashed commit of the following:
mstrasinskis Aug 14, 2024
4af138a
Squashed commit of the following:
mstrasinskis Aug 14, 2024
3ad601f
Restore missing label
mstrasinskis Aug 14, 2024
59f91a3
Merge remote-tracking branch 'origin/main' into mstr/imported-tokens-…
mstrasinskis Aug 15, 2024
eb4b947
Safari table fix - Squashed commit of the following:
mstrasinskis Aug 15, 2024
17da1cd
Formatting
mstrasinskis Aug 16, 2024
05f6380
cleanup: remove unused vars
mstrasinskis Aug 16, 2024
723dbc5
Add remove button to the more popup
mstrasinskis Aug 16, 2024
ae1ed05
style: "more" popup buttons
mstrasinskis Aug 16, 2024
fb9907d
style: Import button redesign
mstrasinskis Aug 16, 2024
8ac4efe
cleanup
mstrasinskis Aug 16, 2024
ced1d8b
feat: remove imported token confirmation dialog (ImportTokenRemoveCon…
mstrasinskis Aug 16, 2024
10cf9ce
Formatting
mstrasinskis Aug 16, 2024
7e1cf6b
Fix type warnings
mstrasinskis Aug 16, 2024
f9011dd
Fix type warnings
mstrasinskis Aug 16, 2024
9efce2c
Remove redundant lables
mstrasinskis Aug 16, 2024
87042ae
Merge branch 'main' into mstr/imported-tokens-form
mstrasinskis Aug 20, 2024
9ddec40
Fix loading imported tokens before the NNS account was created.
mstrasinskis Aug 21, 2024
246e65c
Revert "style: Import button redesign"
mstrasinskis Aug 21, 2024
037c598
Adjust ImportTokenCanisterId.spec to new sub components
mstrasinskis Aug 21, 2024
3923923
test: should not show import token button when they are not loaded
mstrasinskis Aug 21, 2024
87f9cd1
Fix outdated specs
mstrasinskis Aug 21, 2024
8d93ac9
Merge branch 'main' into mstr/imported-tokens-form
mstrasinskis Aug 22, 2024
6bba91d
Move IMPORTANT_CK_TOKEN_IDS to tokens constant
mstrasinskis Aug 22, 2024
82903ce
Replace isUniqueImportedToken with isImportedToken
mstrasinskis Aug 22, 2024
9c016de
test: isImportedToken
mstrasinskis Aug 22, 2024
43778c4
Merge branch 'main' into mstr/imported-tokens-form
mstrasinskis Aug 22, 2024
b31156b
style: update remove confirmation styles
mstrasinskis Aug 23, 2024
1b51c1c
Cleanup RemoveConfirmation component
mstrasinskis Aug 23, 2024
8d031bd
test: ImportTokenRemoveConfirmation
mstrasinskis Aug 23, 2024
45d5a8b
Squashed commit of the following:
mstrasinskis Aug 27, 2024
e54847f
Adjustments for refactored ImportTokenRemoveConfirmation
mstrasinskis Aug 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Comments
mstrasinskis committed Jul 29, 2024
commit 29415bfa863a582a3c90e91c13aadddb3e84d181
4 changes: 2 additions & 2 deletions frontend/src/lib/modals/accounts/ImportTokenModal.svelte
Original file line number Diff line number Diff line change
@@ -62,13 +62,13 @@
};

const onUserInput = async () => {
// TEST: should display the busy screen
// TEST: should display the busy screen text
startBusy({
initiator: "import-token-validation",
labelKey: "import_token.verifying",
});
await updateTokenMetaData();
// TODO: validate index canister id here (if provided)

stopBusy("import-token-validation");

if (nonNullish(tokenMetaData)) {