Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<tbody>
<tr v-for="(currency, index) in reservecurrencies" :key="index">
<td>{{ getTickerByCurrencyId(currency.currencyid) }}</td>
<td>{{ getReserveDaiPrice(currency.reserves) }} DAI</td>
<td>{{ getReserveVrscPrice(currency.reserves) }} VRSC</td>
<td>{{ new Intl.NumberFormat().format(getReserveDaiPrice(currency.reserves)) }} DAI</td>
<td>{{ new Intl.NumberFormat().format(getReserveVrscPrice(currency.reserves)) }} VRSC</td>
<td>{{ getReserveMkrPrice(currency.reserves) }} MKR</td>
<td>{{ getReserveEthPrice(currency.reserves) }} ETH</td>
<td>{{ parseFloat(currency.priceinreserve.toFixed(6)) }}</td>
<td>{{ parseFloat(currency.reserves.toFixed(3)) }}</td>
<td>{{ new Intl.NumberFormat().format(parseFloat(currency.reserves.toFixed(3))) }}</td>
<td>{{ currency.weight }}</td>
</tr>
</tbody>
Expand Down
23 changes: 23 additions & 0 deletions src/utils/proxyverusd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { VerusdRpcInterface } from 'verusd-rpc-ts-client';

const verusd = VerusdRpcInterface("iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq", "https://api.verustest.net");

export const fetchCurrency = async (currency) => {
try {
const response = await verusd.getCurrency(currency);
return response;
} catch (error) {
console.error("Error fetching currency:", error);
throw error;
}
};

export const fetchInfo = async () => {
try {
const response = await verusd.getInfo();
return response;
} catch (error) {
console.error("Error fetching info:", error);
throw error;
}
};