Updated on 2026-08-14
This commit is contained in:
commit
e7a3dffa9b
4 changed files with 10 additions and 5 deletions
|
|
@ -30,7 +30,9 @@ class SaltPayRegistrationManager(
|
|||
) {
|
||||
val kycUrlProvider = KYCUrlProvider(walletPublicKey, kycProvider)
|
||||
|
||||
private val approvalValue: BigDecimal = BigDecimal.valueOf(Math.pow(2.toDouble(), 256.toDouble()) - 1)
|
||||
private val approvalValue: BigDecimal = BigDecimal(2).pow(256).minus(BigDecimal.ONE)
|
||||
.movePointLeft(gnosisRegistrator.walletManager.wallet.blockchain.decimals())
|
||||
|
||||
private val spendLimitValue: BigDecimal = BigDecimal("100")
|
||||
|
||||
fun transactionIsSent(): Boolean {
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ object SaltPayWorkaround {
|
|||
symbol = "WXDAI",
|
||||
contractAddress = "0x4346186e7461cB4DF06bCFCB4cD591423022e417",
|
||||
decimals = 18,
|
||||
id = "xdai",
|
||||
id = "wrapped-xdai",
|
||||
)
|
||||
Blockchain.SaltPayTestnet -> Token(
|
||||
name = "WXDAI Test",
|
||||
symbol = "MyERC20",
|
||||
contractAddress = "0x69cca8D8295de046C7c14019D9029Ccc77987A48",
|
||||
decimals = 0,
|
||||
id = "xdai",
|
||||
id = "wrapped-xdai",
|
||||
)
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ fun Blockchain.toCoinId(): String {
|
|||
Blockchain.Kusama -> "kusama"
|
||||
Blockchain.Optimism, Blockchain.OptimismTestnet -> "ethereum"
|
||||
Blockchain.Dash -> "dash"
|
||||
Blockchain.SaltPay, Blockchain.SaltPayTestnet -> "wrapped-xdai"
|
||||
Blockchain.SaltPay, Blockchain.SaltPayTestnet -> "xdai"
|
||||
Blockchain.Unknown -> "unknown"
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,10 @@ class BlockchainTests {
|
|||
fun allNetworkIdsAreImplemented() {
|
||||
val unimplementedIds = Blockchain.values()
|
||||
.toMutableList()
|
||||
.apply { remove(Blockchain.Unknown) }
|
||||
.apply {
|
||||
remove(Blockchain.Unknown)
|
||||
remove(Blockchain.Optimism)
|
||||
}
|
||||
.map { it to Blockchain.fromNetworkId(it.toNetworkId()) }
|
||||
.mapNotNull { if(it.second == null) it.first else null }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue