Skip to content

Commit

Permalink
Merge pull request #14 from myParakeet/patch-3
Browse files Browse the repository at this point in the history
Update currencies.js to distinguish bonds
  • Loading branch information
mrq1911 authored Apr 25, 2024
2 parents 0b1684b + ba68e9a commit 6c5331c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/currencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ export const hdx = amount => ({currencyId: 0, amount});
export const symbol = currencyId => {
const currency = currencies[currencyId];
if (currency.assetType === 'Bond') {
return symbol(currency.parent) + 'b';
return Number(currencyId) === 1000010 ? 'HDXb₁' :
Number(currencyId) === 1000013 ? 'HDXb₂' :
symbol(currency.parent) + 'b';
}
return currency.symbol || currency.name || (Number(currencyId) === 0 ? 'HDX' : currencyId);
}
Expand Down

0 comments on commit 6c5331c

Please sign in to comment.