diff --git a/.changeset/chilled-needles-kiss.md b/.changeset/chilled-needles-kiss.md new file mode 100644 index 000000000..baa39e359 --- /dev/null +++ b/.changeset/chilled-needles-kiss.md @@ -0,0 +1,7 @@ +--- +'@cypherock/cysync-core': patch +'@cypherock/cysync-ui': patch +'@cypherock/cysync-desktop': patch +--- + +ui for wallet transfer flow diff --git a/packages/cysync-core-constants/src/i18n/lang/ar-AE.json b/packages/cysync-core-constants/src/i18n/lang/ar-AE.json index 294dcc8dc..d27906926 100644 --- a/packages/cysync-core-constants/src/i18n/lang/ar-AE.json +++ b/packages/cysync-core-constants/src/i18n/lang/ar-AE.json @@ -468,15 +468,33 @@ "subTitle": "توجد الدروس التعليمية التالية فقط لتوجيهك على جهازك. يمكنك إنشاء محفظة حتى بدون هذه الدروس التعليمية بشكل مستقل على Cypherock X1", "createWallet": { "title": "إنشاء wallet جديدة", - "list": ["إذا اشتريت Cypherock X1 جديدًا وترغب في إعداد محفظة جديدة"] + "list": ["إذا اشتريت Cypherock X1 جديدًا وترغب في إعداد محفظة جديدة"], + "bulletList": [ + "If you have brought a brand new Cypherock X1 and want to setup a new wallet" + ] }, "importWallet": { "title": "قم باستيراد محفظتك من seed phrase", "list": [ + "تريد استخدام Cypherock X1 كنسخة احتياطية لمحافظك الأخرى", + "تريد نقل أصولك من محافظك الأخرى إلى Cypherock X1", + "تريد إدارة وتتبع محفظة محافظك الأخرى من خلال Cypherock X1" + ], + "bulletList": [ "ترغب في استخدام Cypherock X1 كنسخة احتياطية لمحافظك الأخرى", "ترغب في نقل أصولك من محافظك الأخرى إلى Cypherock X1", "ترغب في إدارة وتتبع محفظة محافظك الأخرى من خلال Cypherock X1" ] + }, + "transferWallet": { + "title": "Transfer from Old to new Cypherock X1", + "list": [ + "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or moreof the X1 cards" + ] + }, + "transfer": { + "title": "Transfer from Old to new Cypherock X1", + "subtitle": "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or more of the X1 cards" } }, "success": { @@ -1314,6 +1332,405 @@ "secondary": "إلغاء", "primary": "الخروج" } + }, + "walletTransfer": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [ + { + "title": "I have lost my X1 vault but I still have all of the 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a completely new X1 Vault only" + } + ] + }, + { + "title": "I have lost my X1 vault and have less than 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + } + ] + } + ] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallet syncing" + }, + { + "title": "Tap any of the 4 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets on by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Repeat the process for all wallets you want to sync" + }, + { + "info": "Follow instructions on the X1 Vault to repeat" + } + ] + } + ] + }, + { + "asideTitle": "Confirmation", + "pages": [ + { + "title": "Congratulations, your wallets are synced", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + } + ] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostCards": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm 'Clear device data' on X1 Vault" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair old cards with the new device" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap any two old X1 cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Make sure you tap the same numbered card as shown on the X! Vault" + }, + { + "info": "You can skip the card tapping for the cards that you do not have" + } + ] + }, + { + "title": "Your X1 Cards should now be paired successfully" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallets syncing" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets one by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Repeat the process for all wallets you want to sync" + }, + { + "warning": "Follow the instructions on X1 Vault to repeat" + } + ] + }, + { + "title": "Congratulations, your wallets are synced with your X1 Vault", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + }, + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase breakup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X1 Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear device data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired successfully", + "subtitle": "Your new cards are sccessfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Vault", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostVault": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if had set it before" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase backup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X! Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any two old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device data cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired sccuessfully", + "subtitle": "Your new cards are successfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Cards", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } } }, "dialogs": { @@ -1535,6 +1952,22 @@ "transferWallet": { "title": "تحويل Wallet", "description": "إذا كان لديك من قبل جهاز Cypherock X1 وترغب في نقل محافظك باستخدام بطاقاتك في حالة فقدانها أو لأي سبب من الأسباب" + }, + "transferWalletSettings": { + "lostVault": { + "title": "I have lost my X1 Vault but I still have all of the 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new device only", + "message": "Use this flow if you have bought a completely new X1 Vault only" + }, + "lostCards": { + "title": "I have lost my X1 Vault and have less than 4 old X1 Cards", + "description": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1", + "message": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + }, + "oldVault": { + "title": "I have my old X1 Vault and have less then 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new set of cards only" + } } } }, diff --git a/packages/cysync-core-constants/src/i18n/lang/de-DE.json b/packages/cysync-core-constants/src/i18n/lang/de-DE.json index 451c0c245..269d5e1f9 100644 --- a/packages/cysync-core-constants/src/i18n/lang/de-DE.json +++ b/packages/cysync-core-constants/src/i18n/lang/de-DE.json @@ -469,6 +469,9 @@ "createWallet": { "title": "Erstellen Sie ein neues Wallet", "list": [ + "Wenn Sie ein brandneues Cypherock X1 gekauft haben und eine neue Wallet einrichten möchten" + ], + "bulletList": [ "Wenn Sie ein brandneues Cypherock X1 gekauft haben und ein neues Wallet einrichten möchten" ] }, @@ -478,7 +481,22 @@ "Sie möchten Cypherock X1 als Backup Ihrer anderen Wallets verwenden", "Sie möchten Ihre Assets von Ihren anderen Wallets auf Cypherock X1 übertragen", "Sie möchten das Portfolio Ihrer anderen Wallets über Cypherock X1 verwalten und verfolgen" + ], + "bulletList": [ + "You want to use Cypherock X1 as a backup of your other wallets", + "You want to transfer your assets from your other wallets into Cypherock X1 ", + "You want to see all portfolio of your other wallets through Cypherock X1 " ] + }, + "transferWallet": { + "title": "Transfer from Old to new Cypherock X1", + "list": [ + "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or moreof the X1 cards" + ] + }, + "transfer": { + "title": "Transfer from Old to new Cypherock X1", + "subtitle": "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or more of the X1 cards" } }, "success": { @@ -1319,6 +1337,405 @@ "secondary": "Abbrechen", "primary": "Beenden" } + }, + "walletTransfer": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [ + { + "title": "I have lost my X1 vault but I still have all of the 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a completely new X1 Vault only" + } + ] + }, + { + "title": "I have lost my X1 vault and have less than 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + } + ] + } + ] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallet syncing" + }, + { + "title": "Tap any of the 4 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets on by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Repeat the process for all wallets you want to sync" + }, + { + "info": "Follow instructions on the X1 Vault to repeat" + } + ] + } + ] + }, + { + "asideTitle": "Confirmation", + "pages": [ + { + "title": "Congratulations, your wallets are synced", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + } + ] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostCards": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm 'Clear device data' on X1 Vault" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair old cards with the new device" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap any two old X1 cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Make sure you tap the same numbered card as shown on the X! Vault" + }, + { + "info": "You can skip the card tapping for the cards that you do not have" + } + ] + }, + { + "title": "Your X1 Cards should now be paired successfully" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallets syncing" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets one by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Repeat the process for all wallets you want to sync" + }, + { + "warning": "Follow the instructions on X1 Vault to repeat" + } + ] + }, + { + "title": "Congratulations, your wallets are synced with your X1 Vault", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + }, + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase breakup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X1 Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear device data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired successfully", + "subtitle": "Your new cards are sccessfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Vault", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostVault": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if had set it before" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase backup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X! Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any two old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device data cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired sccuessfully", + "subtitle": "Your new cards are successfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Cards", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } } }, "dialogs": { @@ -1540,6 +1957,22 @@ "transferWallet": { "title": "Wallet übertragen", "description": "Wenn Sie jemals ein Cypherock X1 hatten und Ihre Wallets mit Ihren Karten übertragen möchten, falls Sie es verloren haben oder aus irgendeinem anderen Grund" + }, + "transferWalletSettings": { + "lostVault": { + "title": "I have lost my X1 Vault but I still have all of the 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new device only", + "message": "Use this flow if you have bought a completely new X1 Vault only" + }, + "lostCards": { + "title": "I have lost my X1 Vault and have less than 4 old X1 Cards", + "description": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1", + "message": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + }, + "oldVault": { + "title": "I have my old X1 Vault and have less then 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new set of cards only" + } } } }, diff --git a/packages/cysync-core-constants/src/i18n/lang/en.json b/packages/cysync-core-constants/src/i18n/lang/en.json index d352b3ded..a0d02c7fe 100644 --- a/packages/cysync-core-constants/src/i18n/lang/en.json +++ b/packages/cysync-core-constants/src/i18n/lang/en.json @@ -470,6 +470,9 @@ "title": "Create a new wallet", "list": [ "If you have bought a brand new Cypherock X1 and want to setup a new wallet" + ], + "bulletList": [ + "If you have brought a brand new Cypherock X1 and want to setup a new wallet" ] }, "importWallet": { @@ -478,7 +481,22 @@ "You want to use Cypherock X1 as a backup of your other wallets ", "You want to transfer your assets from your other wallets into Cypherock X1 ", "You want to manage and track portfolio of your other wallets through Cypherock X1 " + ], + "bulletList": [ + "You want to use Cypherock X1 as a backup of your other wallets", + "You want to transfer your assets from your other wallets into Cypherock X1 ", + "You want to see all portfolio of your other wallets through Cypherock X1 " ] + }, + "transferWallet": { + "title": "Transfer from Old to new Cypherock X1", + "list": [ + "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or moreof the X1 cards" + ] + }, + "transfer": { + "title": "Transfer from Old to new Cypherock X1", + "subtitle": "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or more of the X1 cards" } }, "success": { @@ -1319,6 +1337,405 @@ "secondary": "Cancel", "primary": "Exit" } + }, + "walletTransfer": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [ + { + "title": "I have lost my X1 vault but I still have all of the 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a completely new X1 Vault only" + } + ] + }, + { + "title": "I have lost my X1 vault and have less than 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + } + ] + } + ] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallet syncing" + }, + { + "title": "Tap any of the 4 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets on by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Repeat the process for all wallets you want to sync" + }, + { + "info": "Follow instructions on the X1 Vault to repeat" + } + ] + } + ] + }, + { + "asideTitle": "Confirmation", + "pages": [ + { + "title": "Congratulations, your wallets are synced", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + } + ] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostCards": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm 'Clear device data' on X1 Vault" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair old cards with the new device" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap any two old X1 cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Make sure you tap the same numbered card as shown on the X! Vault" + }, + { + "info": "You can skip the card tapping for the cards that you do not have" + } + ] + }, + { + "title": "Your X1 Cards should now be paired successfully" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallets syncing" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets one by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Repeat the process for all wallets you want to sync" + }, + { + "warning": "Follow the instructions on X1 Vault to repeat" + } + ] + }, + { + "title": "Congratulations, your wallets are synced with your X1 Vault", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + }, + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase breakup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X1 Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear device data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired successfully", + "subtitle": "Your new cards are sccessfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Vault", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostVault": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if had set it before" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase backup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X! Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any two old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device data cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired sccuessfully", + "subtitle": "Your new cards are successfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Cards", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } } }, "dialogs": { @@ -1540,6 +1957,22 @@ "transferWallet": { "title": "Transfer Wallet", "description": "If you ever had a Cypherock X1 and want to transfer your wallets using your cards in case you lost it or any reason whatsoever" + }, + "transferWalletSettings": { + "lostVault": { + "title": "I have lost my X1 Vault but I still have all of the 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new device only", + "message": "Use this flow if you have bought a completely new X1 Vault only" + }, + "lostCards": { + "title": "I have lost my X1 Vault and have less than 4 old X1 Cards", + "description": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1", + "message": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + }, + "oldVault": { + "title": "I have my old X1 Vault and have less then 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new set of cards only" + } } } }, diff --git a/packages/cysync-core-constants/src/i18n/lang/id-ID.json b/packages/cysync-core-constants/src/i18n/lang/id-ID.json index ef39f6073..02589bbf2 100644 --- a/packages/cysync-core-constants/src/i18n/lang/id-ID.json +++ b/packages/cysync-core-constants/src/i18n/lang/id-ID.json @@ -470,6 +470,9 @@ "title": "Buat dompet baru", "list": [ "Jika Anda telah membeli Cypherock X1 baru dan ingin menyiapkan dompet baru" + ], + "bulletList": [ + "If you have brought a brand new Cypherock X1 and want to setup a new wallet" ] }, "importWallet": { @@ -478,7 +481,22 @@ "Anda ingin menggunakan Cypherock X1 sebagai cadangan dari dompet Anda yang lain", "Anda ingin mentransfer aset Anda dari dompet lain ke Cypherock X1", "Anda ingin mengelola dan melacak portofolio dari dompet lain melalui Cypherock X1" + ], + "bulletList": [ + "You want to use Cypherock X1 as a backup of your other wallets", + "You want to transfer your assets from your other wallets into Cypherock X1 ", + "You want to see all portfolio of your other wallets through Cypherock X1 " ] + }, + "transferWallet": { + "title": "Transfer from Old to new Cypherock X1", + "list": [ + "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or moreof the X1 cards" + ] + }, + "transfer": { + "title": "Transfer from Old to new Cypherock X1", + "subtitle": "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or more of the X1 cards" } }, "success": { @@ -1319,6 +1337,405 @@ "secondary": "Batal", "primary": "Keluar" } + }, + "walletTransfer": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [ + { + "title": "I have lost my X1 vault but I still have all of the 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a completely new X1 Vault only" + } + ] + }, + { + "title": "I have lost my X1 vault and have less than 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + } + ] + } + ] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallet syncing" + }, + { + "title": "Tap any of the 4 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets on by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Repeat the process for all wallets you want to sync" + }, + { + "info": "Follow instructions on the X1 Vault to repeat" + } + ] + } + ] + }, + { + "asideTitle": "Confirmation", + "pages": [ + { + "title": "Congratulations, your wallets are synced", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + } + ] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostCards": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm 'Clear device data' on X1 Vault" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair old cards with the new device" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap any two old X1 cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Make sure you tap the same numbered card as shown on the X! Vault" + }, + { + "info": "You can skip the card tapping for the cards that you do not have" + } + ] + }, + { + "title": "Your X1 Cards should now be paired successfully" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallets syncing" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets one by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Repeat the process for all wallets you want to sync" + }, + { + "warning": "Follow the instructions on X1 Vault to repeat" + } + ] + }, + { + "title": "Congratulations, your wallets are synced with your X1 Vault", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + }, + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase breakup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X1 Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear device data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired successfully", + "subtitle": "Your new cards are sccessfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Vault", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostVault": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if had set it before" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase backup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X! Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any two old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device data cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired sccuessfully", + "subtitle": "Your new cards are successfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Cards", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } } }, "dialogs": { @@ -1538,8 +1955,24 @@ "description": "Otentikasi kartu Anda" }, "transferWallet": { - "title": "Transfer Wallet", + "title": "Transfer Dompet", "description": "Jika Anda pernah memiliki Cypherock X1 dan ingin mentransfer wallets menggunakan kartu Anda jika kehilangan atau alasan lainnya" + }, + "transferWalletSettings": { + "lostVault": { + "title": "I have lost my X1 Vault but I still have all of the 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new device only", + "message": "Use this flow if you have bought a completely new X1 Vault only" + }, + "lostCards": { + "title": "I have lost my X1 Vault and have less than 4 old X1 Cards", + "description": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1", + "message": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + }, + "oldVault": { + "title": "I have my old X1 Vault and have less then 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new set of cards only" + } } } }, diff --git a/packages/cysync-core-constants/src/i18n/lang/zh-CN.json b/packages/cysync-core-constants/src/i18n/lang/zh-CN.json index cf0a1fb5a..b86bbe04c 100644 --- a/packages/cysync-core-constants/src/i18n/lang/zh-CN.json +++ b/packages/cysync-core-constants/src/i18n/lang/zh-CN.json @@ -468,15 +468,33 @@ "subTitle": "以下教程只是为了指导你使用设备,即使没有这些教程你也可以独立创建钱包在你的 Cypherock X1 上", "createWallet": { "title": "创建新钱包", - "list": ["如果你购买了一台全新的 Cypherock X1 并希望设置一个新钱包"] + "list": ["如果你购买了一台全新的 Cypherock X1 并希望设置一个新钱包"], + "bulletList": [ + "If you have brought a brand new Cypherock X1 and want to setup a new wallet" + ] }, "importWallet": { "title": "通过$ seed phrase 导入你的钱包", "list": [ - "你希望将 Cypherock X1 作为你其他钱包的备份", - "你希望将你的资产从其他钱包转移到 Cypherock X1", - "你希望通过 Cypherock X1 管理和追踪你其他钱包的投资组合" + "您希望使用 Cypherock X1 作为其他钱包的备份", + "您希望将资产从其他钱包转移到 Cypherock X1", + "您希望通过 Cypherock X1 管理和追踪其他钱包的投资组合" + ], + "bulletList": [ + "You want to use Cypherock X1 as a backup of your other wallets", + "You want to transfer your assets from your other wallets into Cypherock X1 ", + "You want to see all portfolio of your other wallets through Cypherock X1 " ] + }, + "transferWallet": { + "title": "Transfer from Old to new Cypherock X1", + "list": [ + "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or moreof the X1 cards" + ] + }, + "transfer": { + "title": "Transfer from Old to new Cypherock X1", + "subtitle": "If you ever had a Cypherock X1 and want to migrate your wallets to a new Cypherock X1. This might be required in case you lost your X1 Vault and one or more of the X1 cards" } }, "success": { @@ -1294,6 +1312,405 @@ "secondary": "取消", "primary": "退出" } + }, + "walletTransfer": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [ + { + "title": "I have lost my X1 vault but I still have all of the 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a completely new X1 Vault only" + } + ] + }, + { + "title": "I have lost my X1 vault and have less than 4 old X1 cards", + "messageBoxList": [ + { + "info": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + } + ] + } + ] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallet syncing" + }, + { + "title": "Tap any of the 4 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets on by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Repeat the process for all wallets you want to sync" + }, + { + "info": "Follow instructions on the X1 Vault to repeat" + } + ] + } + ] + }, + { + "asideTitle": "Confirmation", + "pages": [ + { + "title": "Congratulations, your wallets are synced", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + } + ] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostCards": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "Start", + "pages": [] + }, + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm 'Clear device data' on X1 Vault" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair old cards with the new device" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap any two old X1 cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "Make sure you tap the same numbered card as shown on the X! Vault" + }, + { + "info": "You can skip the card tapping for the cards that you do not have" + } + ] + }, + { + "title": "Your X1 Cards should now be paired successfully" + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Restore wallets from cards' on your X1 Vault" + }, + { + "title": "Confirm on the X1 Vault to start wallets syncing" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "info": "You can sync all your wallets one by one" + } + ] + }, + { + "title": "Confirm on X1 Vault to sync your wallet" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Repeat the process for all wallets you want to sync" + }, + { + "warning": "Follow the instructions on X1 Vault to repeat" + } + ] + }, + { + "title": "Congratulations, your wallets are synced with your X1 Vault", + "subtitle": "In case there are some wallets that you did not sync, you can always go to that wallet from main menu on the device to resync with the cards" + }, + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if you had set it before" + }, + { + "title": "Tap any X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase breakup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X1 Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear device data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any 2 old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device Data Cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired successfully", + "subtitle": "Your new cards are sccessfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Vault", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } + }, + "walletTransferLostVault": { + "title": "Wallet Transfer", + "tabs": [ + { + "asideTitle": "X1 Vault", + "pages": [ + { + "title": "From the Main Menu of your X1 Vault, Select a wallet" + }, + { + "title": "Click 'View Seed' on your X1 Vault" + }, + { + "title": "Enter PIN if had set it before" + }, + { + "title": "Tap any old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "The wallet seed phrase should now be visible", + "messageBoxList": [ + { + "danger": "Make a temporary physical seed phrase backup" + }, + { + "info": "Repeat this process for all the wallets you intend to transfer to the new X! Cards" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Clear Device Data' on your X1 Vault" + }, + { + "title": "Confirm clearing device data on the X1 Vault" + }, + { + "title": "Tap any two old X1 Cards below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound" + }, + { + "title": "Device data cleared", + "subtitle": "Proceed to pair new cards with the new device", + "messageBoxList": [ + { + "info": "Keep the old cards aside, you won't be needing them any further in this process" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click 'Settings'" + }, + { + "title": "Click 'Pair Cards' on your X1 Vault" + }, + { + "title": "Confirm 'Card Pairing' on X1 Vault" + }, + { + "title": "Tap new set of X1 Cards one by one below the X1 Vault", + "subtitle": "Do not lift until you hear a beep sound", + "messageBoxList": [ + { + "warning": "Make sure your cards belong to the same family" + }, + { + "warning": "Make sure you tap the cards in correct order" + }, + { + "warning": "Make sure to pair all of the 4 new cards with the device" + } + ] + }, + { + "title": "X1 Cards paired sccuessfully", + "subtitle": "Your new cards are successfully paired with the device", + "messageBoxList": [ + { + "info": "Import all the wallet seed phrases into the new cards from the next step" + } + ] + }, + { + "title": "From the Main Menu of your X1 Vault, click on 'Create Wallet'" + } + ] + }, + { + "asideTitle": "Sync X1 Cards", + "pages": [] + }, + { + "asideTitle": "Confirmation", + "pages": [] + } + ], + "closeDialog": { + "title": "Are you sure you want to exit?", + "subtitle": "You can restart the flow from the settings", + "messageBoxList": [ + { + "info": "To restart the flow, go to" + } + ], + "pathText": "Settings -> Device Settings -> Transfer Wallet", + "buttons": { + "secondary": "Cancel", + "primary": "Exit" + } + } } }, "dialogs": { @@ -1515,6 +1932,22 @@ "transferWallet": { "title": "转移钱包", "description": "如果您曾拥有 Cypherock X1 并希望在丢失或其他原因情况下使用您的卡转移钱包" + }, + "transferWalletSettings": { + "lostVault": { + "title": "I have lost my X1 Vault but I still have all of the 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new device only", + "message": "Use this flow if you have bought a completely new X1 Vault only" + }, + "lostCards": { + "title": "I have lost my X1 Vault and have less than 4 old X1 Cards", + "description": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1", + "message": "Use this flow if you have bought a complete new Cypherock X1 and want to transfer from your old Cypherock X1" + }, + "oldVault": { + "title": "I have my old X1 Vault and have less then 4 old X1 Cards", + "description": "Use this flow if you have bought a completely new set of cards only" + } } } }, diff --git a/packages/cysync-core-constants/src/i18n/types.ts b/packages/cysync-core-constants/src/i18n/types.ts index ee1841cf1..dfcd0050b 100644 --- a/packages/cysync-core-constants/src/i18n/types.ts +++ b/packages/cysync-core-constants/src/i18n/types.ts @@ -383,8 +383,10 @@ interface LangOnboarding { walletActionsDialogBox: { title: string; subTitle: string; - createWallet: { title: string; list: string[] }; - importWallet: { title: string; list: string[] }; + createWallet: { title: string; list: string[]; bulletList: string[] }; + importWallet: { title: string; list: string[]; bulletList: string[] }; + transferWallet: { title: string; list: string[] }; + transfer: { title: string; subtitle: string }; }; success: { title: string; subtext: string }; appUpdate: { @@ -643,6 +645,87 @@ interface LangGuidedFlows { subtitle: string; buttons: { secondary: string; primary: string }; }; + walletTransfer: { + title: string; + tabs: { + asideTitle: string; + pages: { + title: string; + subtitle?: string; + messageBoxList?: { + info?: string; + warning?: string; + danger?: string; + }[]; + }[]; + }[]; + closeDialog: { + title: string; + subtitle: string; + messageBoxList?: { + info?: string; + }[]; + pathText: string; + buttons: { + secondary: string; + primary: string; + }; + }; + }; + walletTransferLostCards: { + title: string; + tabs: { + asideTitle: string; + pages: { + title: string; + subtitle?: string; + messageBoxList?: { + info?: string; + warning?: string; + danger?: string; + }[]; + }[]; + }[]; + closeDialog: { + title: string; + subtitle: string; + messageBoxList?: { + info?: string; + }[]; + pathText: string; + buttons: { + secondary: string; + primary: string; + }; + }; + }; + walletTransferLostVault: { + title: string; + tabs: { + asideTitle: string; + pages: { + title: string; + subtitle?: string; + messageBoxList?: { + info?: string; + warning?: string; + danger?: string; + }[]; + }[]; + }[]; + closeDialog: { + title: string; + subtitle: string; + messageBoxList?: { + info?: string; + }[]; + pathText: string; + buttons: { + secondary: string; + primary: string; + }; + }; + }; } interface LangDialogs { @@ -773,6 +856,22 @@ interface LangSettings { x1VaultAuth: { title: string; description: string }; x1CardAuth: { title: string; description: string }; transferWallet: { title: string; description: string }; + transferWalletSettings: { + lostVault: { + title: string; + description: string; + message?: string; + }; + lostCards: { + title: string; + description: string; + message?: string; + }; + oldVault: { + title: string; + description: string; + }; + }; }; }; about: { diff --git a/packages/cysync-core/src/actions/dialog/index.ts b/packages/cysync-core/src/actions/dialog/index.ts index de730d0f1..904045e30 100644 --- a/packages/cysync-core/src/actions/dialog/index.ts +++ b/packages/cysync-core/src/actions/dialog/index.ts @@ -8,7 +8,13 @@ import { ErrorDialogProps } from '~/dialogs/ErrorDialog'; import { IHistoryDialogProps } from '~/dialogs/HistoryDialog'; import { ReceiveDialogProps } from '~/dialogs/Receive'; import { SendDialogProps } from '~/dialogs/Send/'; -import { GuidedFlowType, openDialog } from '~/store'; +import { + GuidedFlowType, + WalletTransferFlowType, + openDialog, + WalletTransferLostCardsFlowType, + WalletTransferFlowLostVaultType, +} from '~/store'; export const openWalletSyncErrorDialog = () => openDialog({ name: 'walletSyncError', data: undefined }); @@ -25,6 +31,17 @@ export const openSignMessageDialog = () => export const openGuidedFlowDialog = (type: GuidedFlowType) => openDialog({ name: 'guidedFlow', data: { type } }); +export const openWalletTransferFlowDialog = (type: WalletTransferFlowType) => + openDialog({ name: 'walletTransferFlow', data: { type } }); + +export const openWalletTransferLostCardsFlowDialog = ( + type: WalletTransferLostCardsFlowType, +) => openDialog({ name: 'walletTransferLostCardsFlow', data: { type } }); + +export const openWalletTransferFlowLostVaultDialog = ( + type: WalletTransferFlowLostVaultType, +) => openDialog({ name: 'walletTransferLostVaultFlow', data: { type } }); + export const openAddAccountDialog = (props?: AddAccountDialogProps) => openDialog({ name: 'addAccount', data: props }); diff --git a/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/CloseConfirmation.tsx b/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/CloseConfirmation.tsx index 5fa302966..70cdeba6c 100644 --- a/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/CloseConfirmation.tsx +++ b/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/CloseConfirmation.tsx @@ -2,63 +2,94 @@ import { Flex, Button, LangDisplay, - goldFail, IconDialogBox, Image, } from '@cypherock/cysync-ui'; -import React, { Dispatch, FC, SetStateAction } from 'react'; +import React, { Dispatch, FC, SetStateAction, useEffect } from 'react'; -import { - closeDialog, - selectLanguage, - useAppDispatch, - useAppSelector, -} from '~/store'; +import { IDialogState, closeDialog, useAppDispatch } from '~/store'; -const Buttons: FC<{ +interface CloseConfirmationProps { setShowOnClose: Dispatch>; -}> = ({ setShowOnClose }) => { - const lang = useAppSelector(selectLanguage); + dialogText: { + title: string; + subtitle: string; + primaryButton: string; + secondaryButton: string; + pathText?: string; + messageBoxList?: Record[]; + }; + closeDialogType: keyof IDialogState; + iconSrc?: string; + handleEscapeKey?: boolean; + isTextDifferent?: boolean; +} + +export const CloseConfirmation: FC = ({ + setShowOnClose, + dialogText, + closeDialogType, + iconSrc, + handleEscapeKey = true, + isTextDifferent = false, +}) => { + const { + title, + subtitle, + primaryButton, + secondaryButton, + pathText, + messageBoxList, + } = dialogText; const dispatch = useAppDispatch(); - return ( - - - - - ); -}; -export const CloseConfirmation: FC<{ - setShowOnClose: Dispatch>; -}> = ({ setShowOnClose }) => { - const lang = useAppSelector(selectLanguage); + useEffect(() => { + const handleKeyDown = (event: KeyboardEvent) => { + if (event.key === 'Escape') { + setShowOnClose(false); + } + }; + + if (handleEscapeKey) { + document.addEventListener('keydown', handleKeyDown); + return () => { + document.removeEventListener('keydown', handleKeyDown); + }; + } + return undefined; + }, [dispatch, setShowOnClose, closeDialogType, handleEscapeKey]); + return ( } - title={lang.strings.guidedFlows.closeDialog.title} - subtext={lang.strings.guidedFlows.closeDialog.subtitle} - footerComponent={} - onClose={() => setShowOnClose(false)} + icon={Icon} + title={title} + subtext={subtitle} + footerComponent={ + + + + + } + isTextDifferent={isTextDifferent} + messageBoxList={messageBoxList} + pathText={pathText} /> ); }; + +CloseConfirmation.defaultProps = { + iconSrc: undefined, + handleEscapeKey: true, + isTextDifferent: false, +}; diff --git a/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/FinalMessage.tsx b/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/FinalMessage.tsx index 39b63d070..561ca16d3 100644 --- a/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/FinalMessage.tsx +++ b/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/FinalMessage.tsx @@ -1,23 +1,14 @@ import { - GuidedFlowDialogBox, Flex, - informationIcon, Button, LangDisplay, Image, + informationIcon, } from '@cypherock/cysync-ui'; import { createSelector } from '@reduxjs/toolkit'; -import React, { - Dispatch, - FC, - SetStateAction, - useEffect, - useState, -} from 'react'; +import React, { Dispatch, FC, SetStateAction, useState } from 'react'; -import { openAddAccountDialog, syncWalletsWithDevice } from '~/actions'; -import { useDevice } from '~/context'; -import { useGuidedFlow } from '~/dialogs/GuidedFlow/context'; +import { openAddAccountDialog } from '~/actions'; import { selectLanguage, selectWallets, @@ -32,68 +23,63 @@ const selectWalletsAndLang = createSelector( (a, b) => ({ lang: a, ...b }), ); -const informationIconReactElement = ( - device -); - const Buttons: FC<{ - setShowWalletNotCreatedDialog: Dispatch>; -}> = ({ setShowWalletNotCreatedDialog }) => { - const { onCloseDialog } = useGuidedFlow(); - const { lang, wallets } = useAppSelector(selectWalletsAndLang); + setShowDialog: Dispatch>; + onCloseDialog: () => void; +}> = ({ setShowDialog, onCloseDialog }) => { const dispatch = useAppDispatch(); - const { connection } = useDevice(); + const { lang, wallets } = useAppSelector(selectWalletsAndLang); + const displayText = lang.strings.guidedFlows.finalMessage; const tryOpeningAddAccount = () => { if (wallets.length > 0) { onCloseDialog(); dispatch(openAddAccountDialog()); } else { - setShowWalletNotCreatedDialog(true); + setShowDialog(true); } }; - - useEffect(() => { - dispatch( - syncWalletsWithDevice({ - connection, - doFetchFromDevice: true, - }), - ); - }, []); - return ( ); }; -export const FinalMessage: FC = () => { +export const FinalMessage: FC<{ + DialogBox: React.ComponentType; + contextHook: () => { + onNext: () => void; + onPrevious: () => void; + onCloseDialog: () => void; + changeCondition?: () => void; + onSelect?: () => void; + }; +}> = ({ DialogBox, contextHook }) => { + const { onNext, onPrevious, onCloseDialog, changeCondition, onSelect } = + contextHook(); + const [showDialog, setShowDialog] = useState(false); const lang = useAppSelector(selectLanguage); - const { onNext, onPrevious } = useGuidedFlow(); - const [showWalletNotCreatedDialog, setShowWalletNotCreatedDialog] = - useState(false); return ( <> - {showWalletNotCreatedDialog && } - } + } onNext={onNext} onPrevious={onPrevious} + changeCondition={changeCondition} + onSelect={onSelect} title={lang.strings.guidedFlows.finalMessage.title} + lang={lang} footer={ } /> diff --git a/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/WalletNotCreatedDialog.tsx b/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/WalletNotCreatedDialog.tsx index eb4fa488b..7e1f36207 100644 --- a/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/WalletNotCreatedDialog.tsx +++ b/packages/cysync-core/src/dialogs/GuidedFlow/Dialogs/WalletNotCreatedDialog.tsx @@ -8,21 +8,19 @@ import { import React, { FC } from 'react'; import { openWalletActionsDialog } from '~/actions'; -import { useGuidedFlow } from '~/dialogs/GuidedFlow/context'; import { selectLanguage, useAppDispatch, useAppSelector } from '~/store'; -const Buttons: FC = () => { +interface ButtonsProps { + onClose: () => void; +} + +const Buttons: FC = ({ onClose }) => { const lang = useAppSelector(selectLanguage); - const { onCloseDialog } = useGuidedFlow(); const dispatch = useAppDispatch(); + return ( - - + {selectedAction === 'walletTransfer' ? ( + + ) : ( + + )} diff --git a/packages/cysync-core/src/dialogs/WalletTransferFlow/context/index.tsx b/packages/cysync-core/src/dialogs/WalletTransferFlow/context/index.tsx new file mode 100644 index 000000000..dd8eedfff --- /dev/null +++ b/packages/cysync-core/src/dialogs/WalletTransferFlow/context/index.tsx @@ -0,0 +1,311 @@ +// The ReactNodes won't be rendered as list so key is not required +/* eslint-disable react/jsx-key */ +import { + ConfirmTransferDeviceGraphics, + EnterPin, + Image, + ImportWalletNewUser, + MessageBoxType, + RestoreWallets, + SettingsDevice, + Video, + successIcon, + tapAllCardDeviceAnimation2DVideo, +} from '@cypherock/cysync-ui'; +import React, { + Context, + FC, + ReactNode, + createContext, + useContext, + useEffect, + useMemo, + useState, +} from 'react'; + +import { openWalletTransferLostCardsFlowDialog } from '~/actions'; +import { FinalMessage } from '~/dialogs/GuidedFlow/Dialogs/FinalMessage'; +import { addKeyboardEvents, useStateWithRef } from '~/hooks'; + +import { + WalletTransferFlowType, + closeDialog, + selectLanguage, + useAppDispatch, + useAppSelector, +} from '../../..'; +import { WalletTransferFlowDialogBox } from '~/dialogs/WalletTransferFlowDialogBox'; +import { WalletTransferLostCardsFlowDialogBox } from '~/dialogs/WalletTransferLostCardsFlowDialogBox'; + +type ITabs = { + name: string; + dialogs: ReactNode[]; +}[]; + +export interface WalletTransferFlowContextInterface { + tabs: ITabs; + currentTab: number; + setCurrentTab: (data: number) => void; + currentDialog: number; + setCurrentDialog: (data: number) => void; + onNext: () => void; + onSelect: () => void; + changeCondition?: () => void; + onPrevious: () => void; + blastConfetti: boolean; + showBackButton: boolean; + onCloseDialog: () => void; + title: string; +} + +export const WalletTransferFlowContext: Context = + createContext( + {} as WalletTransferFlowContextInterface, + ); + +export interface WalletTransferFlowContextProviderProps { + children: ReactNode; + type: WalletTransferFlowType; +} + +const successIconReactElement = device; + +const dialogsImages: Record = { + walletTransfer: [ + [ + , + , + ], + [ + , + , + , +