Skip to content

Commit

Permalink
chore: style
Browse files Browse the repository at this point in the history
  • Loading branch information
nvtaveras committed Sep 20, 2023
1 parent 8a86511 commit e3cd43c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions src/exchange_adapters/currencyapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export class CurrencyApiAdapter extends BaseExchangeAdapter implements ExchangeA
* }
*/
parseTicker(json: any): Ticker {
assert (json.valid, 'CurrencyApi response object contains false valid field');
assert (json.conversion.amount === 1, 'CurrencyApi response object amount field is not 1')
assert (
assert(json.valid, 'CurrencyApi response object contains false valid field')
assert(json.conversion.amount === 1, 'CurrencyApi response object amount field is not 1')
assert(
json.conversion.from === this.config.baseCurrency,
'CurrencyApi response object from field does not match base currency'
);
assert (
)
assert(
json.conversion.to === this.config.quoteCurrency,
'CurrencyApi response object to field does not match quote currency'
)
Expand Down
16 changes: 8 additions & 8 deletions test/exchange_adapters/currencyapi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ describe('CurrencyApi adapter', () => {
})

const validMockTickerJson = {
"valid": true,
"updated": 1695168063,
"conversion": {
"amount": 1,
"from": "EUR",
"to": "XOF",
"result": 655.315694
}
valid: true,
updated: 1695168063,
conversion: {
amount: 1,
from: 'EUR',
to: 'XOF',
result: 655.315694,
},
}

const invalidJsonWithFalseValid = {
Expand Down

0 comments on commit e3cd43c

Please sign in to comment.