Skip to content

Commit 16226a7

Browse files
Merge pull request #1513 from xchainjs/hippo/expose-data-on-thorchain-query
Expose more parameter on thorchain query
2 parents c238b09 + e38a72b commit 16226a7

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.changeset/whole-mails-boil.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@xchainjs/xchain-thorchain-query': patch
3+
---
4+
5+
Expose more info on quoteswap

packages/xchain-thorchain-query/src/thorchain-query.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ export class ThorchainQuery {
188188
streamingSwapBlocks: 0,
189189
streamingSwapSeconds: 0,
190190
totalSwapSeconds: 0,
191+
recommendedGasRate: '0',
192+
router: '',
191193
warning: '',
192194
},
193195
}
@@ -250,6 +252,8 @@ export class ThorchainQuery {
250252
streamingSwapSeconds: swapQuote.streaming_swap_seconds ? swapQuote.streaming_swap_seconds : 0,
251253
totalSwapSeconds: swapQuote.total_swap_seconds ? swapQuote.total_swap_seconds : 0,
252254
canSwap: !swapQuote.memo || errors.length > 0 ? false : true,
255+
recommendedGasRate: swapQuote.recommended_gas_rate ? swapQuote.recommended_gas_rate : '0',
256+
router: swapQuote.router ? swapQuote.router : '',
253257
errors,
254258
warning: swapQuote.warning,
255259
},

packages/xchain-thorchain-query/src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ export type SwapEstimate = {
4343
streamingSwapBlocks: number // The number of blocks for streaming swap
4444
streamingSwapSeconds: number // The time for streaming swap in seconds
4545
totalSwapSeconds: number // The total swap time in seconds
46+
router: string
47+
recommendedGasRate: string
4648
canSwap: boolean // Indicates if swap can be performed
4749
errors: string[] // List of errors encountered during estimation
4850
warning: string // Any warning messages

0 commit comments

Comments
 (0)