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

MOB-2028 - Purchase UW #575

Merged
merged 93 commits into from
Jun 21, 2024

Conversation

Oleg-Pecheneg
Copy link
Contributor

No description provided.

Oleg-Pecheneg and others added 30 commits April 9, 2024 15:50
* Added entry points to add mpc wallet

* Created view to enter code or email

* Added enter passphrase step UI

* POC of claim workflow

* Added Fireblocks SDK.
Recreated sign for JWT device flow

* Added logging

* Updated base api route.
Pass code to passphrase screen

* Run fireblocks init action

* Stop fireblocks join wallet on error

* Refactoring

* Improved logging
Fixed API calls

* Updated UI.
Added secure option to text field

* Updated fireblocks keys storage

* Break mpc flow into steps.
Visualise steps on the UI

* Set deadline to sign operation

* Localize task with delay error

* Added circular progress view

* Abstract mpc connection with protocol.
Abstract building of mpc connector.
Created Preview entities

* Abstract network layer

* Abstracted network layer further

* Make action button pressed function's task main actor

* Re-enable fireblocks storage solution

* Set fireblocks logs level to debug

* Temp solution to handle failing and share logs file

* Refactoring

* Create testable entities

* Added tests to user profiles service behaviour

* Added more tests of user profiles service

* Fixed WalletsDataServiceTests

* Fixed DomainProfilesServiceTests

* Fixed Tests

* Added tests for when domains removed

* Refactoring

* Updated Fireblocks SDK version

* Fixed tests

* Added mpc wallet type. Added TODOs to handle it where required

* Updated test wallet external id

* Created entity to represent JWToken

* Use JWToken structure in MPC

* Refactoring

* Fixed merging issue

* Use custom keychain storage

* Refactoring.
Moved FB-UD implementation details to separate namespace

* Refactoring

* Refactoring
* Added entry points to add mpc wallet

* Created view to enter code or email

* Added enter passphrase step UI

* POC of claim workflow

* Added Fireblocks SDK.
Recreated sign for JWT device flow

* Added logging

* Updated base api route.
Pass code to passphrase screen

* Run fireblocks init action

* Stop fireblocks join wallet on error

* Refactoring

* Improved logging
Fixed API calls

* Updated UI.
Added secure option to text field

* Updated fireblocks keys storage

* Break mpc flow into steps.
Visualise steps on the UI

* Set deadline to sign operation

* Localize task with delay error

* Added circular progress view

* Abstract mpc connection with protocol.
Abstract building of mpc connector.
Created Preview entities

* Abstract network layer

* Abstracted network layer further

* Make action button pressed function's task main actor

* Re-enable fireblocks storage solution

* Set fireblocks logs level to debug

* Temp solution to handle failing and share logs file

* Refactoring

* Create testable entities

* Added tests to user profiles service behaviour

* Added more tests of user profiles service

* Fixed WalletsDataServiceTests

* Fixed DomainProfilesServiceTests

* Fixed Tests

* Added tests for when domains removed

* Refactoring

* Updated Fireblocks SDK version

* Fixed tests

* Added mpc wallet type. Added TODOs to handle it where required

* Updated test wallet external id

* Created entity to represent JWToken

* Use JWToken structure in MPC

* Refactoring

* Fixed merging issue

* Use custom keychain storage

* Refactoring.
Moved FB-UD implementation details to separate namespace

* Refactoring

* Refactoring

* Added function to refresh access token

* Added functions to load accounts and account assets

* Added function to load available blockchains.
Added include balances flag to get assets API.

* Created rpc handler for wallet related requests
Refactoring

* Refactoring

* Extended mpc wallet with important properties

* Project structure update
* Added entry points to add mpc wallet

* Created view to enter code or email

* Added enter passphrase step UI

* POC of claim workflow

* Added Fireblocks SDK.
Recreated sign for JWT device flow

* Added logging

* Updated base api route.
Pass code to passphrase screen

* Run fireblocks init action

* Stop fireblocks join wallet on error

* Refactoring

* Improved logging
Fixed API calls

* Updated UI.
Added secure option to text field

* Updated fireblocks keys storage

* Break mpc flow into steps.
Visualise steps on the UI

* Set deadline to sign operation

* Localize task with delay error

* Added circular progress view

* Abstract mpc connection with protocol.
Abstract building of mpc connector.
Created Preview entities

* Abstract network layer

* Abstracted network layer further

* Make action button pressed function's task main actor

* Re-enable fireblocks storage solution

* Set fireblocks logs level to debug

* Temp solution to handle failing and share logs file

* Refactoring

* Create testable entities

* Added tests to user profiles service behaviour

* Added more tests of user profiles service

* Fixed WalletsDataServiceTests

* Fixed DomainProfilesServiceTests

* Fixed Tests

* Added tests for when domains removed

* Refactoring

* Updated Fireblocks SDK version

* Fixed tests

* Added mpc wallet type. Added TODOs to handle it where required

* Updated test wallet external id

* Created entity to represent JWToken

* Use JWToken structure in MPC

* Refactoring

* Fixed merging issue

* Use custom keychain storage

* Refactoring.
Moved FB-UD implementation details to separate namespace

* Refactoring

* Refactoring

* Added function to refresh access token

* Added functions to load accounts and account assets

* Added function to load available blockchains.
Added include balances flag to get assets API.

* Created rpc handler for wallet related requests
Refactoring

* Refactoring

* Extended mpc wallet with important properties

* Project structure update

* Created storage for wallet metadata

* Refactoring

* Refactoring

* Create UD wallet from mpc wallet

* Updated mpcMetadata in ud wallet

* Stored connected mpc wallet to ud wallets storage

* Continue onboarding after mpc wallet added

* Updated URLs list

* Extended logging. Refactoring

* Set wallet address as alias name when create MPC

* Updated get bootstrap code function from admin to send it to the email

* Remove expected response structure from send code function
Handle incorrect code and password errors

* Enhanced error code verification

* Fixed mpc wallet initial name

* Refactoring

* Created interface to sign tx in mpc wallet
# Conflicts:
#	unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj
# Conflicts:
#	unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj
#	unstoppable-ios-app/domains-manager-ios.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
* Added entry points to add mpc wallet

* Created view to enter code or email

* Added enter passphrase step UI

* POC of claim workflow

* Added Fireblocks SDK.
Recreated sign for JWT device flow

* Added logging

* Updated base api route.
Pass code to passphrase screen

* Run fireblocks init action

* Stop fireblocks join wallet on error

* Refactoring

* Improved logging
Fixed API calls

* Updated UI.
Added secure option to text field

* Updated fireblocks keys storage

* Break mpc flow into steps.
Visualise steps on the UI

* Set deadline to sign operation

* Localize task with delay error

* Added circular progress view

* Abstract mpc connection with protocol.
Abstract building of mpc connector.
Created Preview entities

* Abstract network layer

* Abstracted network layer further

* Make action button pressed function's task main actor

* Re-enable fireblocks storage solution

* Set fireblocks logs level to debug

* Temp solution to handle failing and share logs file

* Refactoring

* Create testable entities

* Added tests to user profiles service behaviour

* Added more tests of user profiles service

* Fixed WalletsDataServiceTests

* Fixed DomainProfilesServiceTests

* Fixed Tests

* Added tests for when domains removed

* Refactoring

* Updated Fireblocks SDK version

* Fixed tests

* Added mpc wallet type. Added TODOs to handle it where required

* Updated test wallet external id

* Created entity to represent JWToken

* Use JWToken structure in MPC

* Refactoring

* Fixed merging issue

* Use custom keychain storage

* Refactoring.
Moved FB-UD implementation details to separate namespace

* Refactoring

* Refactoring

* Added function to refresh access token

* Added functions to load accounts and account assets

* Added function to load available blockchains.
Added include balances flag to get assets API.

* Created rpc handler for wallet related requests
Refactoring

* Refactoring

* Extended mpc wallet with important properties

* Project structure update

* Created storage for wallet metadata

* Refactoring

* Refactoring

* Create UD wallet from mpc wallet

* Updated mpcMetadata in ud wallet

* Stored connected mpc wallet to ud wallets storage

* Continue onboarding after mpc wallet added

* Updated URLs list

* Extended logging. Refactoring

* Set wallet address as alias name when create MPC

* Updated get bootstrap code function from admin to send it to the email

* Remove expected response structure from send code function
Handle incorrect code and password errors

* Enhanced error code verification

* Fixed mpc wallet initial name

* Refactoring

* Created interface to sign tx in mpc wallet

* Setup purchase mpc wallet module

* Created FirebasePurchaseMPCWalletService.
Created UI in auth view
Refactoring

* Purchase module refactoring

* Cleaning

* Created EcomPurchaseMPCWalletServiceProtocol

* Moved auth functions to view model

* Handle authentication to purchase mpc

* Updated purchase mpc protocol and preview service

* Added temp entry point to buy mpc wallet

* Purchase mpc view model refactoring

* Add and leave only mpc wallet in user's cart

* DomainItem cleaning

* Added email input view

* Update confirm view

* Run purchase on action

* Cleaning

* Fixed filter unsupported products from cart when purchase mpc wallet

* Check if user already own mpc wallet

* Close flow after purchase

* Update request url when login with google
* UDWallet, Signing refactored / WalletState removed

* refactoring

* renaming

* restored UDWallet schema

* remove dead

* refactoring

* review changes
* Prepare to use bootstrap code if refresh token is expired

* Temp throw error when restore with bootstrap code

* Updated Fireblocks SDK to 2.4.0

* Implemented refresh auth codes with bootstrap code function

* Cleaning
# Conflicts:
#	unstoppable-ios-app/domains-manager-ios.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
* Added API calls to start message signing.
Updated saved accounts and assets structure.

* Prepare and request message signing

* Completed message signing funcitonality

* Call personal message signing in mpc wallets service

* Check for fireblocks instance with device id already initialised

* Ask for sig confirmation when receive WC request to MPC wallet

* Qeue operations before submitting

* Added debug logs

* MPCMessage type and helper computed value of String (#507)

* Fix preview target

* Use new structure to determine message encoding type

* Show loading state when activating messaging profile

* Cleaning

* Use proxy RPC connector in fireblocks

* Fixed typo

---------

Co-authored-by: rommex <roman@unstoppabledomains.com>
# Conflicts:
#	unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj
#	unstoppable-ios-app/domains-manager-ios/Modules/Home/SendCryptoAsset/CryptoSender/CryptoSender.swift
# Conflicts:
#	unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj
* Added API calls to start message signing.
Updated saved accounts and assets structure.

* Prepare and request message signing

* Completed message signing funcitonality

* Call personal message signing in mpc wallets service

* Check for fireblocks instance with device id already initialised

* Ask for sig confirmation when receive WC request to MPC wallet

* Qeue operations before submitting

* Added debug logs

* MPCMessage type and helper computed value of String (#507)

* Fix preview target

* Use new structure to determine message encoding type

* Show loading state when activating messaging profile

* Cleaning

* Use proxy RPC connector in fireblocks

* Updated connect wallet screen UI

* Updated copies

* Updated enter credentials view UI

* Localize content

* Pass entered MPC credentials

* Created and connected mpc activation module

* Implemented UI for activation progress card

* Handle errors and finish

* Update UI for error states

* Created activation input view

* Handle entered data

* Fix typo

* Added email format verification

* Added resend code functionality
Updated UI for IP SE

* Updated logic and UI in activation screen

* Adjust UI for IP SE

* Updated MPC wallet card background

* Refactoring

* Updated onboarding tutorial screen

* Created new UI for add wallet view

* Cleaning

* Created view to select add wallet option

* Implemented UI and option selection when add wallet

* Updated dashed progress view

* Fixed typo

* Copies update

---------

Co-authored-by: rommex <roman@unstoppabledomains.com>
* Updated add wallet selection pull up

* Setting up activation flow.
Created enter credentials view

* Implemented navigation to enter code and activation screens

* Updated fireblocks connector environment

* Adjust UI

* Handle signature still processing by fireblocks

* Dismiss activate MPC flow on finish

* Pass activation result
* MOB-1986 - Fixing incorrect copies

* Check for MPC_EDDSA_ED25519 fireblocks key is ready
* Fixed Preview target

* Updated UI of MPC wallet in the lists

* Removed back up option for mpc wallet

* Updated UI for locally generated wallet

* Updated icon for web account option during onboarding
Updated copies

* Updated UI of mpc activation screens
* Updated title for activating screen

* Increase the timeout for keys is ready
# Conflicts:
#	unstoppable-ios-app/domains-manager-ios/SupportingFiles/Constants.swift
#	unstoppable-ios-app/domains-manager-iosTests/DomainRecordsViewModelTests.swift
* Created tests for auth tokens refresh flow

* Handle tokens expired by removing mpc wallet

* Fixed typo

* Clear wallet associated data after removed

* Created MPCWallets UI handler protocol

* Created UI to ask to reconnect mpc wallet

* Handle keys set is expired

* Ask user for confirmationw hen mpc wallet expired

* Log tokens lifetime

* Restore mpc logs

* Handle queueing of restore mpc wallets requests

* Handle sudden token invalidation

* Update restart functionality

* Updated login flow navigation

* Fixed preview target

* Hide back button while activating

* Store email in mpc wallet metadata

* Create separate UI flow for reconnect flow

* Setup reimport nav flow

* Created remove mpc wallet confirmation pull up

* Refactoring
Removed change email option when reconnect
# Conflicts:
#	unstoppable-ios-app/domains-manager-ios.xcodeproj/project.pbxproj
#	unstoppable-ios-app/domains-manager-ios/Entities/BalanceTokenUIDescription.swift
#	unstoppable-ios-app/domains-manager-ios/Extensions/Extension-String+Preview.swift
#	unstoppable-ios-app/domains-manager-ios/Modules/Home/SendCryptoAsset/SendCryptoAsset.swift
#	unstoppable-ios-app/domains-manager-ios/Modules/MPC/PurchaseMPCFlow/PurchaseMPCWalletNavigationDestination.swift
#	unstoppable-ios-app/domains-manager-ios/Modules/Onboarding/OnboardingAddWallet/OnboardingAddWalletViewController.swift
#	unstoppable-ios-app/domains-manager-ios/Modules/Onboarding/OnboardingData.swift
#	unstoppable-ios-app/domains-manager-ios/Modules/Onboarding/OnboardingNavigationController.swift
#	unstoppable-ios-app/domains-manager-ios/Modules/Onboarding/Tutorial/TutorialViewPresenter.swift
#	unstoppable-ios-app/domains-manager-ios/Modules/SignTransactions/TransactionRequestConfirmationView/PaymentTransactionRequestConfirmationView.swift
#	unstoppable-ios-app/domains-manager-ios/Services/Firebase/BaseFirebaseInteractionService.swift
#	unstoppable-ios-app/domains-manager-ios/Services/Firebase/PreviewEcomPurchaseMPCWalletService.swift
#	unstoppable-ios-app/domains-manager-ios/Services/Firebase/Purchase/Ecom.swift
#	unstoppable-ios-app/domains-manager-ios/Services/Firebase/Purchase/EcomPurchaseInteractionService.swift
#	unstoppable-ios-app/domains-manager-ios/Services/Firebase/Purchase/Purchase domains/FirebasePurchaseDomainsService.swift
#	unstoppable-ios-app/domains-manager-ios/Services/Firebase/Purchase/Purchase mpc wallet/EcomPurchaseMPCWalletService.swift
#	unstoppable-ios-app/domains-manager-ios/Services/Firebase/Purchase/Purchase mpc wallet/EcomPurchaseMPCWalletServiceProtocol.swift
* Implemented UI to select purchase MPC wallet

* Fetch MPC wallet price

* Updated copies
* Implemented UI to select purchase MPC wallet

* Fetch MPC wallet price

* Adjusted UI and copies on enter UD credentials view

* Prepare MPC card for purchase states

* Implemented UI for UW card

* Updated copies

* Updated progress state when purchasing MPC wallet

* Added UI for error state

* Added confirmation email field for UD auth

* Created step when user already has UW purchased

* Fixed checkout screen background
* Implemented UI to select purchase MPC wallet

* Fetch MPC wallet price

* Adjusted UI and copies on enter UD credentials view

* Prepare MPC card for purchase states

* Implemented UI for UW card

* Updated copies

* Updated progress state when purchasing MPC wallet

* Added UI for error state

* Added confirmation email field for UD auth

* Created step when user already has UW purchased

* Fixed checkout screen background

* Created PurchaseMPCWalletTakeoverCredentialsView

* Created MPCWalletPasswordValidator

* Localize UI

* Create UI for PurchaseMPCWalletTakeoverRecoveryView

* Created PurchaseMPCWalletTakeoverProgressView

* Fixed target

* Added email to already have wallet view

* Added illustration to mpc recovery view

* Implemented mpc takeover email verification

* Finishing UI in takeover progress view

* Handle try again action

* Handle multiple failed attempts during takeover

* Updated password validation UI

* Finalise purchase flow

* Fixed recovery screen copies

* MOB-2051 - Purchase UW analytics (#573)

* Project structure update
Added analytics to ud auth view

* Added analytics to purchase checkout view

* Updated analytics for rest of the purchase views

* Improved analytics logging

* Fixed recovery screen copies

* Update logging level

* Code review updates
* Implemented UI to select purchase MPC wallet

* Fetch MPC wallet price

* Adjusted UI and copies on enter UD credentials view

* Prepare MPC card for purchase states

* Implemented UI for UW card

* Updated copies

* Updated progress state when purchasing MPC wallet

* Added UI for error state

* Added confirmation email field for UD auth

* Created step when user already has UW purchased

* Fixed checkout screen background

* Created PurchaseMPCWalletTakeoverCredentialsView

* Created MPCWalletPasswordValidator

* Localize UI

* Create UI for PurchaseMPCWalletTakeoverRecoveryView

* Created PurchaseMPCWalletTakeoverProgressView

* Fixed target

* Added email to already have wallet view

* Added illustration to mpc recovery view

* Implemented mpc takeover email verification

* Finishing UI in takeover progress view

* Handle try again action

* Handle multiple failed attempts during takeover

* Updated password validation UI

* Finalise purchase flow

* Project structure update
Added analytics to ud auth view

* Added analytics to purchase checkout view

* Updated analytics for rest of the purchase views

* Improved analytics logging

* Fixed recovery screen copies

* Fixed recovery screen copies

* Update logging level

* Update purchase view model to new entities

* Remove POC buy mpc entry point

* Handle create wallet action

* Handle already have wallet event and actions

* Finish purchase in app flow

* Purchase flow finalisation

* Cleaning

* MOB-2051 - Purchase UW analytics (#573)

* Project structure update
Added analytics to ud auth view

* Added analytics to purchase checkout view

* Updated analytics for rest of the purchase views

* Improved analytics logging

* Fixed recovery screen copies

* Update logging level

* Code review updates

* Move regex to the top of the scope
@Oleg-Pecheneg Oleg-Pecheneg requested a review from rommex May 31, 2024 13:53
@Oleg-Pecheneg Oleg-Pecheneg merged commit 03d3939 into development Jun 21, 2024
@Oleg-Pecheneg Oleg-Pecheneg deleted the dev/feat/fireblocks/MOB-2028-purchase branch June 21, 2024 10:38
rommex added a commit that referenced this pull request Jun 21, 2024
* development:
  MOB-2028 - Purchase UW (#575)
  MOB-2076 - Handle USDC asset in ULW (#583)
  Always show MATIC USDC in the list of tokens. (#585)
  MOB-2074 - Update ULW name and appearance in the list (#584)
  MOB-2053 Remove Legacy Wallets handling (#578)
  Stopping the AV Session on a detached thread (#582)
  MOB-2073 - Updated Fireblocks SDK (#581)
  MOB-2069 - Copy update for ULW removal (#580)
rommex added a commit that referenced this pull request Jul 4, 2024
…/MOB-2060-Send-Crypto-on-Base-chain

* commit '9bf5bc72c5ae8c7aeeb6f0d19c0b075e46cf5ec1': (24 commits)
  Fixed tests target (#599)
  Update WC SDK to 1.19.4 (#598)
  MOB-2092 - Fixed copies and domain resolution (#597)
  MOB-2098 - Show all available ULW tokens in share screen (#596)
  Tx display info refactoring (#595)
  Disable LD noisy logs
  MOB-2092 - Created UI to show TX details (#594)
  MOB-2086 - Update Fireblocks SDK to v. 2.6.0 (#593)
  MOB-2090 - Fixing WC requests pull ups UI (#592)
  MOB-2083 - Support sign typed data via ULW (#591)
  changed to Float (#590)
  added 'eth_signTypedData_v4' to optional methods
  Fixed raw wallet address input formatting (#589)
  Let users send crypto to themself (#587)
  MOB-2078 - Fixed regex pattern validation (#588)
  MOB-2078 - Support sending to none EVM addresses like SOL and BTC for ULW (#586)
  MOB-2028 - Purchase UW (#575)
  MOB-2076 - Handle USDC asset in ULW (#583)
  Always show MATIC USDC in the list of tokens. (#585)
  MOB-2074 - Update ULW name and appearance in the list (#584)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants