-
Notifications
You must be signed in to change notification settings - Fork 17
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
[PWN-9260] [WIP] Withdrawal #1479
Conversation
@@ -424,6 +424,68 @@ extension Resolver: ResolverRegistering { | |||
} | |||
.scope(.session) | |||
|
|||
register { | |||
StrigaBankTransferUserDataRepository( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what has changed here?
title: viewModel.actionTitle.uppercaseFirst, | ||
style: .primaryWhite, | ||
expandable: true, | ||
isEnabled: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is by default, no? or you will update it later?
@@ -17,4 +19,7 @@ public protocol BankTransferUserDataRepository { | |||
func clearCache() async | |||
|
|||
func getWallet(userId: String) async throws -> UserWallet? | |||
|
|||
func withdrawalInfo() async throws -> WithdrawalInfo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get probably as other methods
@@ -22,6 +23,10 @@ public protocol BankTransferService<Provider> where Provider: BankTransferUserDa | |||
func resendSMS() async throws | |||
|
|||
func getKYCToken() async throws -> String | |||
|
|||
// WithdrowalProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a part of WithdrowalProvider i guess
|
||
public func withdrawalInfo() async throws -> Provider.WithdrawalInfo? { | ||
try await repository.withdrawalInfo() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space
public struct StrigaWithdrawalInfo: Codable { | ||
public var IBAN: String? | ||
public var BIC: String? | ||
public var receiver: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let maybe
@@ -88,6 +99,8 @@ extension StrigaLocalProviderImpl: StrigaLocalProvider { | |||
case registration | |||
case account | |||
case whitelisted | |||
case withdrawalInfo | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space
@@ -412,3 +412,21 @@ private extension UserWallet { | |||
self.accounts = UserAccounts(eur: eur, usdc: usdc) | |||
} | |||
} | |||
|
|||
extension StrigaBankTransferUserDataRepository { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might wanna put a mark on it? MARK: - Withdrawal
@@ -42,6 +42,8 @@ final class BankTransferClaimCoordinator: Coordinator<BankTransferClaimCoordinat | |||
override func start() -> AnyPublisher<BankTransferClaimCoordinatorResult, Never> { | |||
// Start OTP Coordinator | |||
bankTransferService.value.state | |||
.prefix(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ?
submitLabel: .next | ||
) | ||
} | ||
Text("Your bank account name must match the name registered to your Key App account") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
texts
} | ||
} | ||
|
||
//struct WithdrawView_Previews: PreviewProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if it can be used?
Link jira to issue
https://p2pvalidator.atlassian.net/browse/PWN-9260
Description of the changes