Skip to content

Commit

Permalink
Update @nimiq/utils for custom FiatApi Coingecko API URL
Browse files Browse the repository at this point in the history
  • Loading branch information
sisou committed Apr 8, 2024
1 parent 1dc532a commit 23a6a8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@nimiq/oasis-api": "^1.1.1",
"@nimiq/rpc": "^0.4.1",
"@nimiq/style": "^0.8.2",
"@nimiq/utils": "^0.5.0",
"@nimiq/utils": "^0.5.2",
"@nimiq/vue-components": "https://github.com/nimiq/vue-components#build/hub",
"@opengsn/common": "^2.2.5",
"@sentry/vue": "^6.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/views/CashlinkCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import {
SmallPage,
Tooltip,
} from '@nimiq/vue-components';
import { FiatApiSupportedCryptoCurrency, getExchangeRates } from '@nimiq/utils';
import { FiatApiSupportedCryptoCurrency, getExchangeRates, setCoingeckoApiUrl } from '@nimiq/utils';
@Component({components: {
Account,
Expand Down Expand Up @@ -286,6 +286,7 @@ class CashlinkCreate extends Vue {
if (this.request.fiatCurrency) {
const fiatCurrency = this.request.fiatCurrency;
setCoingeckoApiUrl('https://nq-coingecko-proxy.deno.dev/api/v3');
const refreshFiatRate = () => {
getExchangeRates([FiatApiSupportedCryptoCurrency.NIM], [fiatCurrency]).then((prices) => {
this.fiatRate = prices[FiatApiSupportedCryptoCurrency.NIM][fiatCurrency] || null;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1609,10 +1609,10 @@
resolved "https://registry.yarnpkg.com/@nimiq/style/-/style-0.8.5.tgz#36a8bd8f58d55ee3e8ea5b249e51a116638e3b90"
integrity sha512-il2+hrodQ7iL4ARPwfGmGvrEYgtMHAoQSbcyapxEQEG7vDYj5r+ssuhKB+oYmdRUxA1/HvyGDnWG3XenKvQyIA==

"@nimiq/utils@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@nimiq/utils/-/utils-0.5.0.tgz#10e0e234d95e878e57130ebb32ff3d7224a5101b"
integrity sha512-t5X2OjtKWZvKvr2t7Tk/rTTYlE2o2BCHl7bsmqZNrAwH0NhCsCGncZhK8Zki0GYldPyYizf5YlALJMvbzByviQ==
"@nimiq/utils@^0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@nimiq/utils/-/utils-0.5.2.tgz#4d5a6195e2f051a8a56b11a75ea3c38667a86e04"
integrity sha512-9VRttvkL1nilCxJIaRQH8uoIX3UqbUp+NiQJFVYnaBgu4In6YOP02LcIhUHUnv5v85avVQdhygJTUnKxp5IRmQ==
dependencies:
big-integer "^1.6.44"

Expand Down

0 comments on commit 23a6a8f

Please sign in to comment.