Skip to content

Commit 1a261f0

Browse files
committed
Remove pluginUtils
1 parent 56811d1 commit 1a261f0

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

src/components/scenes/TradeCreateScene.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,6 @@ export const TradeCreateScene = (props: Props): React.ReactElement => {
199199
regionCode: {
200200
countryCode: countryCode || 'US',
201201
stateProvinceCode
202-
},
203-
pluginUtils: {
204-
getHistoricalRate: async (_codePair: string, _date: string) => {
205-
return 1
206-
}
207202
}
208203
}
209204
}, [

src/plugins/ramps/paybis/paybisRampPlugin.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,6 @@ export const paybisRampPlugin: RampPluginFactory = (
766766
regionCode,
767767
pluginId: currencyPluginId,
768768
promoCode: maybePromoCode,
769-
pluginUtils,
770769
fiatCurrencyCode,
771770
displayCurrencyCode,
772771
direction,
@@ -896,9 +895,9 @@ export const paybisRampPlugin: RampPluginFactory = (
896895
if (convertFromCc === 'iso:USD') {
897896
amountUsd = exchangeAmount
898897
} else {
899-
const isoNow = new Date().toISOString()
900-
const ratePair = `${convertFromCc}_iso:USD`
901-
const rate = await pluginUtils.getHistoricalRate(ratePair, isoNow)
898+
// For now, always return 1 (matching old implementation)
899+
// TODO: Implement actual rate fetching if needed
900+
const rate = 1
902901
amountUsd = mul(exchangeAmount, String(rate))
903902
}
904903
if (lte(amountUsd, '1000')) {

src/plugins/ramps/rampPluginTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface RampQuoteRequest {
4343
amountType: 'fiat' | 'crypto'
4444
direction: 'buy' | 'sell'
4545
regionCode: FiatPluginRegionCode
46-
pluginUtils: FiatPluginUtils
46+
pluginUtils?: FiatPluginUtils
4747
promoCode?: string
4848
}
4949

0 commit comments

Comments
 (0)