Skip to content

Commit ee25b2b

Browse files
committed
add usds base
1 parent 95f89f0 commit ee25b2b

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

sample/wallet/src/main/kotlin/com/reown/sample/wallet/ui/routes/dialog_routes/transaction/TokenAddresses.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ enum class Chain(val id: String) {
77
}
88

99
enum class StableCoin {
10-
USDC,
11-
USDT
10+
USDC, //decimals 6
11+
USDT, //decimals 6
12+
USDS //decimals 6
1213
}
1314

1415
object TokenAddresses {
1516
private val ADDRESSES = mapOf(
1617
Chain.BASE to mapOf(
1718
StableCoin.USDC to "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
18-
StableCoin.USDT to "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb"
19+
StableCoin.USDT to "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
20+
StableCoin.USDS to "0x820c137fa70c8691f0e44dc420a5e53c168921dc"
1921
),
2022
Chain.ARBITRUM to mapOf(
2123
StableCoin.USDC to "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",

sample/wallet/src/main/kotlin/com/reown/sample/wallet/ui/routes/dialog_routes/transaction/TransactionRoute.kt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,21 @@ fun BalanceCard(viewModel: TransactionViewModel, selectedChain: Chain) {
168168
fontSize = 16.sp
169169
)
170170
}
171+
Row(
172+
modifier = Modifier.fillMaxWidth(),
173+
horizontalArrangement = Arrangement.SpaceBetween
174+
) {
175+
Text(
176+
text = "USDS",
177+
color = Color.Gray,
178+
fontSize = 16.sp
179+
)
180+
Text(
181+
text = "${balanceState[Pair(selectedChain, StableCoin.USDS)] ?: "-.--"} USDS",
182+
color = Color.White,
183+
fontSize = 16.sp
184+
)
185+
}
171186
}
172187
}
173188
}
@@ -222,6 +237,12 @@ fun TransactionCard(
222237
onClick = { onCoinSelected(StableCoin.USDT) },
223238
modifier = Modifier.weight(1f)
224239
)
240+
CoinSelectionButton(
241+
text = StableCoin.USDS.name,
242+
selected = selectedCoin == StableCoin.USDS,
243+
onClick = { onCoinSelected(StableCoin.USDS) },
244+
modifier = Modifier.weight(1f)
245+
)
225246
}
226247

227248
Spacer(modifier = Modifier.height(16.dp))

0 commit comments

Comments
 (0)