File tree 1 file changed +2
-2
lines changed
pragma-node/src/infra/repositories
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ async fn find_alternative_pair_price(
170
170
171
171
for alt_currency in alternative_currencies {
172
172
let base_alt_pair = format ! ( "{}/{}" , base, alt_currency) ;
173
- let alt_quote_pair = format ! ( "{}/{}" , alt_currency , quote ) ;
173
+ let alt_quote_pair = format ! ( "{}/{}" , quote , alt_currency ) ;
174
174
175
175
if pair_id_exist ( pool, base_alt_pair. clone ( ) ) . await ?
176
176
&& pair_id_exist ( pool, alt_quote_pair. clone ( ) ) . await ?
@@ -361,7 +361,7 @@ pub async fn get_decimals(
361
361
) -> Result < u32 , InfraError > {
362
362
let conn = pool. get ( ) . await . map_err ( adapt_infra_error) ?;
363
363
364
- let quote_currency = pair_id. split ( '/' ) . next ( ) . unwrap ( ) . to_uppercase ( ) ;
364
+ let quote_currency = pair_id. split ( '/' ) . last ( ) . unwrap ( ) . to_uppercase ( ) ;
365
365
366
366
// Fetch currency in DB
367
367
let decimals: BigDecimal = conn
You can’t perform that action at this time.
0 commit comments