Skip to content

Commit 5da06ce

Browse files
committed
fix(ocp): pass through rate directly when calculating valueExchange for USDC
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent 6c1c0b2 commit 5da06ce

File tree

1 file changed

+4
-2
lines changed
  • services/opencode/src/main/kotlin/com/getcode/opencode/model/financial

1 file changed

+4
-2
lines changed

services/opencode/src/main/kotlin/com/getcode/opencode/model/financial/LocalFiat.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ data class LocalFiat(
7878
// this doesn't need a calculated value exchange since we are USDC
7979
return if (rate.currency != CurrencyCode.USD) {
8080
LocalFiat(
81-
usdc = usdValue,
82-
nativeAmount = amount
81+
underlyingTokenAmount = usdValue,
82+
nativeAmount = amount,
83+
rate = rate,
84+
mint = token.address,
8385
)
8486
} else {
8587
LocalFiat(usdc = usdValue)

0 commit comments

Comments
 (0)