Label: complexity: high
Points: 200
Description
For UIs displaying invoice amounts in a payer's preferred fiat/asset reference, this issue adds a converter using the contract's existing price-oracle pattern (mirroring price_oracle/get_price from the contract side) at the SDK level for arbitrary display conversions, not just payment-affecting ones.
Technical Context
New src/currencyConverter.ts. convertAmount(amount, fromToken, toDisplayCurrency, oracleAddress) calls the same oracle contract interface (get_price) the contract uses, but purely for display — does not affect payment amounts.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
For UIs displaying invoice amounts in a payer's preferred fiat/asset reference, this issue adds a converter using the contract's existing price-oracle pattern (mirroring
price_oracle/get_pricefrom the contract side) at the SDK level for arbitrary display conversions, not just payment-affecting ones.Technical Context
New
src/currencyConverter.ts.convertAmount(amount, fromToken, toDisplayCurrency, oracleAddress)calls the same oracle contract interface (get_price) the contract uses, but purely for display — does not affect payment amounts.Acceptance Criteria
convertAmount(...)returns a convertedbigint/display string with no payment-side effectspriceCacheTtlMs(default 10s) to avoid spamming the oracle contractpay()calculations)