Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ class TokenSelectionResolverTest {

// endregion

// region USDF exclusion
// region USDF selection

@Test
fun `never selects USDF as fallback`() {
fun `selects USDF as fallback when it has highest balance`() {
val result = resolveTokenSelection(
balances = mapOf(
mintA to Fiat(0.0, CurrencyCode.USD),
Expand All @@ -160,11 +160,11 @@ class TokenSelectionResolverTest {
currentSelection = mintA,
rate = usdRate,
)
assertNull(result)
assertEquals(Mint.usdf, result)
}

@Test
fun `skips USDF and selects next highest`() {
fun `selects USDF over lower balance tokens`() {
val result = resolveTokenSelection(
balances = mapOf(
mintA to Fiat(0.0, CurrencyCode.USD),
Expand All @@ -174,7 +174,7 @@ class TokenSelectionResolverTest {
currentSelection = mintA,
rate = usdRate,
)
assertEquals(mintB, result)
assertEquals(Mint.usdf, result)
}

@Test
Expand Down
Loading