@ledgerhq/cryptoassets 13.1.0-nightly.1 → 13.1.0-nightly.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/tokens.ts CHANGED
@@ -115,19 +115,19 @@ export function listTokenTypesForCryptoCurrency(currency: CryptoCurrency): strin
115
115
  /**
116
116
  *
117
117
  */
118
- export function findTokenByTicker(ticker: string): TokenCurrency | null | undefined {
118
+ export function findTokenByTicker(ticker: string): TokenCurrency | undefined {
119
119
  return tokensByTicker[ticker];
120
120
  }
121
121
 
122
122
  /**
123
123
  *
124
124
  */
125
- export function findTokenById(id: string): TokenCurrency | null | undefined {
125
+ export function findTokenById(id: string): TokenCurrency | undefined {
126
126
  return tokensById[id];
127
127
  }
128
128
 
129
129
  let deprecatedDisplayed = false;
130
- export function findTokenByAddress(address: string): TokenCurrency | null | undefined {
130
+ export function findTokenByAddress(address: string): TokenCurrency | undefined {
131
131
  if (!deprecatedDisplayed) {
132
132
  deprecatedDisplayed = true;
133
133
  console.warn("findTokenByAddress is deprecated. use findTokenByAddressInCurrency");
@@ -138,7 +138,7 @@ export function findTokenByAddress(address: string): TokenCurrency | null | unde
138
138
  export function findTokenByAddressInCurrency(
139
139
  address: string,
140
140
  currencyId: string,
141
- ): TokenCurrency | null | undefined {
141
+ ): TokenCurrency | undefined {
142
142
  return tokensByCurrencyAddress[currencyId + ":" + address.toLowerCase()];
143
143
  }
144
144