@@ -100,6 +100,10 @@ export interface BuySellProviderMetadata extends ProviderMetadata {
100100 disabledSubdivisions ?: Subdivisions ;
101101}
102102
103+ export interface TradeCommon {
104+ statusUrl ?: string | null ; // URL with ID assigned to the trade by the provider to check status; if null, do not show any status url
105+ }
106+
103107// buy types
104108
105109export type BuyTradeFinalStatus =
@@ -160,6 +164,7 @@ export interface BuyProviderInfo extends BuySellProviderMetadata {
160164
161165export interface BuyListResponse {
162166 country : string ;
167+ subdivision ?: string ;
163168 suggestedFiatCurrency ?: string | undefined ; // optional field, fiat currency based on user's IP
164169 providers : BuyProviderInfo [ ] ;
165170 defaultAmountsOfFiatCurrencies : FiatCurrenciesProps ;
@@ -180,7 +185,7 @@ export interface BuyTradeQuoteRequest {
180185
181186export type BuyTradeQuoteResponse = BuyTrade [ ] ;
182187
183- export interface BuyTrade {
188+ export interface BuyTrade extends TradeCommon {
184189 fiatAmount ?: number | undefined ; // 1000 - DEPRECATED, used only for TREZOR
185190 fiatStringAmount ?: string | undefined ; // 1000 - will pay fiat amount
186191 fiatCurrency ?: string | undefined ; // EUR
@@ -294,7 +299,7 @@ export type DexApprovalType =
294299 | "ZERO" // resets approval
295300 | "PRESET" ; // PRESET takes value from approvalStringAmount
296301
297- export interface ExchangeTrade {
302+ export interface ExchangeTrade extends TradeCommon {
298303 send ?: CryptoId | undefined ; // bitcoin
299304
300305 sendStringAmount ?: string | undefined ; // "0.01"
@@ -314,7 +319,6 @@ export interface ExchangeTrade {
314319 signature ?: string | undefined ; // Evercoin only, passed from createTrade response to confirmTrade request
315320 orderId ?: string | undefined ; // internal ID assigned to the trade by the exchange
316321 quoteId ?: string | undefined ;
317- statusUrl ?: string | undefined ; // internal URL + ID assigned to the trade by the exchange to check status
318322 status ?: ExchangeTradeStatus | undefined ; // state of trade after confirmTrade
319323 error ?: string | undefined ; // something went wrong after confirmTrade
320324 receiveTxHash ?: string | undefined ; // hash of tx from exchange to user or DEX swap
@@ -494,6 +498,7 @@ export interface SellProviderInfo extends BuySellProviderMetadata {
494498
495499export interface SellListResponse {
496500 country : string ;
501+ subdivision ?: string ;
497502 providers : SellProviderInfo [ ] ;
498503}
499504
@@ -515,7 +520,7 @@ export interface SellFiatTradeQuoteRequest {
515520
516521export type SellFiatTradeQuoteResponse = SellFiatTrade [ ] ;
517522
518- export interface SellFiatTrade {
523+ export interface SellFiatTrade extends TradeCommon {
519524 amountInCrypto ?: boolean | undefined ; // true for cryptoAmount, false for fiatAmount
520525 fiatStringAmount ?: string | undefined ; // 1000
521526 fiatCurrency ?: string | undefined ; // EUR
0 commit comments