transaction placement dialog

This commit is contained in:
tim
2024-11-11 20:55:28 -04:00
parent 43891434c5
commit a9bf23ddbb
18 changed files with 439 additions and 122 deletions

View File

@@ -144,7 +144,7 @@ export function inversionPreference(chainId, base, quote) {
const inputInverted = base.a > quote.a
const token0 = !inputInverted ? base.a : quote.a
const token1 = inputInverted ? base.a : quote.a
const key = [chainId, token0, token1];
const key = [chainId, token0, token1]; // todo chainId shouldn't matter
const prefs = usePrefStore()
if (!(key in prefs.inverted)) {
// todo prefer stablecoins as the quote asset
@@ -157,6 +157,7 @@ export function inversionPreference(chainId, base, quote) {
break // definitely inverted
}
}
console.log('inverted?', base, quote, preferInverted)
prefs.inverted[key] = preferInverted
}
// console.log('inversion preference', base, quote, prefs.inverted[key], inputInverted)