-
Notifications
You must be signed in to change notification settings - Fork 360
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: Scan & device accounts - add account v2 #8802
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ 4 Skipped Deployments
|
1bd5924
to
7788db9
Compare
1ea3840
to
9dde117
Compare
@@ -28,6 +28,10 @@ import TouchHintCircle from "./TouchHintCircle"; | |||
import Touchable from "./Touchable"; | |||
import { AccountSettingsNavigatorParamList } from "./RootNavigator/types/AccountSettingsNavigator"; | |||
import { AddAccountsNavigatorParamList } from "./RootNavigator/types/AddAccountsNavigator"; | |||
import AccountItem from "~/newArch/features/Accounts/components/AccountsListView/components/AccountItem"; |
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.
LLM
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.
done β
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.
We don't have it in DS?
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.
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.
If we're going to use the same icon for the LLD add account can we add it to the DS please ? I don't know if this doc is up to date
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.
I'll do it in a separate ticket once needed by LLD.
"scanningTitle": "Looking for any existing accounts on the Blockchain...", | ||
"sections": { | ||
"importable": { | ||
"title": "We found {{count}} account" |
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.
it needs plural
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.
done β
@@ -4002,6 +4002,8 @@ | |||
"desc": "Are you sure you want to cancel adding accounts?" | |||
}, | |||
"imported": "Asset added successfully", | |||
"added": "Account added to your portfolio", | |||
"added_plural": "{{count}} Accounts added to your portfolio", |
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.
"added_plural": "{{count}} Accounts added to your portfolio", | |
"added_plural": "{{count}} accounts added to your portfolio", |
I'm not sure but should be lowercase imo
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.
"title": "Accounts already in the Portfolio ({{length}})" | ||
}, | ||
"migrate": { | ||
"title": "Accounts to update" |
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.
should be singular also no?
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.
no idea about this one, as i'm using the exact same wording of add account v1 , see the same object above
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.
as there is no count there , i prefer leave it like add account v1 wording
import Button from "~/components/Button"; | ||
import LText from "~/components/LText"; |
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.
Same here better to use DS
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.
good to know, i'll do it
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.
done β
import ExternalLink from "~/icons/ExternalLink"; | ||
import Info from "~/icons/Info"; |
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.
those also, if they are available :)
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.
good to know ! (well while i'm using the same as this component apps/ledger-live-mobile/src/screens/AddAccounts/03-Accounts.tsx , i didn't knew that ) thanks
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.
done β
|
||
import { accountsSelector } from "~/reducers/accounts"; | ||
import { blacklistedTokenIdsSelector } from "~/reducers/settings"; | ||
import { Theme, withTheme } from "../../../../../colors"; |
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.
from "styled-components/native"; ?
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.
deleted
import Button from "~/components/Button"; | ||
import PreventNativeBack from "~/components/PreventNativeBack"; | ||
import Chevron from "~/icons/Chevron"; | ||
import LText from "~/components/LText"; |
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.
can you replace this by as you use it already? :)
I know it's not the scope but could be good !
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.
done β
@@ -43,7 +43,7 @@ export default function SelectNetwork({ | |||
onPress={onPressItem} | |||
subTitle={ | |||
item.accounts.length > 0 | |||
? t("transfer.receive.selectNetwork.account", { count: item.accounts.length }) |
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.
if not used anymore could you remove it from common.json?
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.
it's used in the receive flow
2376268
to
c83b9ac
Compare
c83b9ac
to
240d981
Compare
240d981
to
7e50827
Compare
inline?: boolean; | ||
returnToSwap?: boolean; | ||
onSuccess?: (res: { scannedAccounts: Account[]; selected: Account[] }) => void; | ||
}; | ||
[ScreenName.SelectAccounts]: CommonParams & { | ||
currency: CryptoCurrency | TokenCurrency; |
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.
currency: CryptoCurrency | TokenCurrency; | |
currency: CryptoOrTokenCurrency; |
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.
done β
import { ScreenName } from "~/const"; | ||
import { Device } from "@ledgerhq/types-devices"; | ||
import { AccountLikeEnhanced } from "../ScanDeviceAccounts/types"; | ||
import { Account } from "@ledgerhq/types-live"; | ||
import { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets"; |
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.
import { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets"; |
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.
done β
}); | ||
}, [account, navigation, onAccountNameChange]); | ||
if (llmNetworkBasedAddAccountFlow?.enabled) { | ||
(navigation as StackNavigationProp<AccountSettingsNavigatorParamList>).navigate( |
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.
Do we need this type assertion here ? Is there a way to avoid it ? We should avoid using type assertions as much as possible as they can introduce nasty and hard to debug errors
padding="8px" | ||
columnGap={8} | ||
> | ||
<AccountItem account={account as Account} balance={account.spendableBalance} /> |
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.
same here
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.
done β
β¦o a maximum useEffect issues
fab2226
β Checklist
npx changeset
was attached.π Description
In the current feature:
πΉ Videos
selectAccTest1.mov
NotesβΌοΈ
I will add more video related to funded importable accounts which i don't possess on my seed actually.
This won't prevent the PR from being reviewed or even tested if you have a device with multiple accounts for a single currency.
β Context
https://ledgerhq.atlassian.net/browse/LIVE-15524
π§ Checklist for the PR Reviewers