Updated on 2026-08-14
This commit is contained in:
parent
8f4a8b18ef
commit
319fd373b5
7 changed files with 136 additions and 133 deletions
|
|
@ -161,7 +161,10 @@ object PreferencesKeys {
|
|||
intPreferencesKey(name = "tronNetworkFeeNotificationShowCount")
|
||||
}
|
||||
|
||||
val TANGEM_PAY_WITHDRAW_ORDERS_KEY by lazy { stringPreferencesKey(name = "tangemPayWithdrawOrders") }
|
||||
val TANGEM_PAY_WITHDRAW_ORDERS_KEY by lazy { stringPreferencesKey(name = "tangemPayWithdrawOrdersKey") }
|
||||
val TANGEM_PAY_ACTIVE_WITHDRAW_ORDERS_KEY by lazy {
|
||||
stringPreferencesKey(name = "tangemPayActiveWithdrawOrdersKey")
|
||||
}
|
||||
val TANGEM_PAY_ELIGIBILITY_KEY by lazy { booleanPreferencesKey(name = "tangemPayEligibility") }
|
||||
|
||||
fun getShouldShowNotificationKey(key: String) = booleanPreferencesKey("showShowNotificationUM_$key")
|
||||
|
|
|
|||
|
|
@ -29,11 +29,25 @@ interface TangemPayStorage {
|
|||
suspend fun storeCheckCustomerWalletResult(userWalletId: UserWalletId, isPaeraCustomer: Boolean)
|
||||
suspend fun checkCustomerWalletResult(userWalletId: UserWalletId): Boolean?
|
||||
|
||||
/** Called after creating withdraw order, active order id */
|
||||
suspend fun storeActiveWithdrawOrderId(userWalletId: UserWalletId, orderId: String)
|
||||
|
||||
/** Called after creating withdraw order, saves order data */
|
||||
suspend fun storeWithdrawOrder(userWalletId: UserWalletId, data: TangemPayWithdrawState)
|
||||
|
||||
suspend fun getWithdrawOrder(userWalletId: UserWalletId): TangemPayWithdrawState?
|
||||
/** Returns single active order id. Once the order is completed, deletes id from storage.
|
||||
* Only one active order allowed for a wallet */
|
||||
suspend fun getActiveWithdrawOrderId(userWalletId: UserWalletId): String?
|
||||
|
||||
suspend fun deleteWithdrawOrder(userWalletId: UserWalletId)
|
||||
/** Returns all withdraw orders saved.
|
||||
* Once we get tx hash for an order, it gets deleted from this storage */
|
||||
suspend fun getWithdrawOrders(userWalletId: UserWalletId): List<TangemPayWithdrawState>?
|
||||
|
||||
/** Deletes active withdraw order. Called after order is completed */
|
||||
suspend fun deleteActiveWithdrawOrder(userWalletId: UserWalletId)
|
||||
|
||||
/** Deletes withdraw order data. Called after getting its tx hash */
|
||||
suspend fun deleteWithdrawOrder(userWalletId: UserWalletId, orderId: String)
|
||||
|
||||
suspend fun getHideMainOnboardingBanner(userWalletId: UserWalletId): Boolean
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue