Skip to content

Commit

Permalink
Merge branch 'addL2tokenOpts' of github.com:kajoseph/bitcore
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Jul 15, 2024
2 parents 029c923 + 2ef8e0b commit 73f057b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/bitcore-wallet-service/src/lib/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ export const Constants = {

ETH_TOKEN_OPTS: CWC.Constants.ETH_TOKEN_OPTS,
MATIC_TOKEN_OPTS: CWC.Constants.MATIC_TOKEN_OPTS,
ARB_TOKEN_OPTS: CWC.Constants.ARB_TOKEN_OPTS,
OP_TOKEN_OPTS: CWC.Constants.OP_TOKEN_OPTS,
BASE_TOKEN_OPTS: CWC.Constants.BASE_TOKEN_OPTS,

BITPAY_CONTRACTS: {
MULTISEND: 'MULTISEND'
Expand Down
9 changes: 9 additions & 0 deletions packages/bitcore-wallet-service/src/lib/emailservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ export class EmailService {
} else if (Constants.MATIC_TOKEN_OPTS[tokenAddress]) {
unit = Constants.MATIC_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else if (Constants.ARB_TOKEN_OPTS[tokenAddress]) {
unit = Constants.ARB_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else if (Constants.OP_TOKEN_OPTS[tokenAddress]) {
unit = Constants.OP_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else if (Constants.BASE_TOKEN_OPTS[tokenAddress]) {
unit = Constants.BASE_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else {
let customTokensData;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,15 @@ export class PushNotificationsService {
} else if (Constants.MATIC_TOKEN_OPTS[tokenAddress]) {
unit = Constants.MATIC_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else if (Constants.ARB_TOKEN_OPTS[tokenAddress]) {
unit = Constants.ARB_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else if (Constants.OP_TOKEN_OPTS[tokenAddress]) {
unit = Constants.OP_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else if (Constants.BASE_TOKEN_OPTS[tokenAddress]) {
unit = Constants.BASE_TOKEN_OPTS[tokenAddress].symbol.toLowerCase();
label = UNIT_LABELS[unit];
} else {
let customTokensData;
try {
Expand Down

0 comments on commit 73f057b

Please sign in to comment.