Updated on 2026-08-14
This commit is contained in:
parent
b83b9d4ef6
commit
9db2ebaef4
21 changed files with 279 additions and 20 deletions
|
|
@ -134,6 +134,23 @@ internal class DefaultTangemPayStorage @Inject constructor(
|
|||
appPreferencesStore.store(PreferencesKeys.getTangemPayOrderIdKey(customerWalletAddress), "")
|
||||
}
|
||||
|
||||
override suspend fun storeVirtualAccountOrderId(customerWalletAddress: String, vaOrderId: String) {
|
||||
appPreferencesStore.store(
|
||||
key = PreferencesKeys.getTangemPayVirtualAccountOrderIdKey(customerWalletAddress),
|
||||
value = vaOrderId,
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun getVirtualAccountOrderId(customerWalletAddress: String): String? {
|
||||
return appPreferencesStore.getSyncOrNull(
|
||||
key = PreferencesKeys.getTangemPayVirtualAccountOrderIdKey(customerWalletAddress),
|
||||
).takeIf { !it.isNullOrEmpty() }
|
||||
}
|
||||
|
||||
override suspend fun clearVirtualAccountOrderId(customerWalletAddress: String) {
|
||||
appPreferencesStore.store(PreferencesKeys.getTangemPayVirtualAccountOrderIdKey(customerWalletAddress), "")
|
||||
}
|
||||
|
||||
override suspend fun storeCheckCustomerWalletResult(userWalletId: UserWalletId, isPaeraCustomer: Boolean) {
|
||||
appPreferencesStore.store(
|
||||
PreferencesKeys.getTangemPayCheckCustomerByWalletId(userWalletId),
|
||||
|
|
|
|||
|
|
@ -81,6 +81,15 @@ internal class MockAwareTangemPayStorage @Inject constructor(
|
|||
override suspend fun clearOrderId(customerWalletAddress: String) =
|
||||
real.clearOrderId(customerWalletAddress)
|
||||
|
||||
override suspend fun storeVirtualAccountOrderId(customerWalletAddress: String, vaOrderId: String) =
|
||||
real.storeVirtualAccountOrderId(customerWalletAddress, vaOrderId)
|
||||
|
||||
override suspend fun getVirtualAccountOrderId(customerWalletAddress: String): String? =
|
||||
real.getVirtualAccountOrderId(customerWalletAddress)
|
||||
|
||||
override suspend fun clearVirtualAccountOrderId(customerWalletAddress: String) =
|
||||
real.clearVirtualAccountOrderId(customerWalletAddress)
|
||||
|
||||
override suspend fun storeCheckCustomerWalletResult(userWalletId: UserWalletId, isPaeraCustomer: Boolean) =
|
||||
real.storeCheckCustomerWalletResult(userWalletId, isPaeraCustomer)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue