@ledgerhq/coin-framework 0.5.3 → 0.6.0-next.0

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/operation.ts CHANGED
@@ -241,13 +241,14 @@ export const isAddressPoisoningOperation = (
241
241
  };
242
242
 
243
243
  export function isEditableOperation(account: AccountLike, operation: Operation): boolean {
244
- let isEthFamily = false;
244
+ let isEvmFamily = false;
245
245
  if (account.type === "Account") {
246
- isEthFamily = account.currency.family === "ethereum";
246
+ isEvmFamily = account.currency.family === "evm";
247
247
  } else if (account.type === "TokenAccount") {
248
- isEthFamily = account.token.parentCurrency.family === "ethereum";
248
+ isEvmFamily = account.token.parentCurrency.family === "evm";
249
249
  }
250
- return isEthFamily && operation.blockHeight === null && !!operation.transactionRaw;
250
+
251
+ return isEvmFamily && operation.blockHeight === null && !!operation.transactionRaw;
251
252
  }
252
253
 
253
254
  // return the oldest stuck pending operation and its corresponding account according to a eth account or a token subaccount. If no stuck pending operation is found, return undefined
@@ -265,7 +266,7 @@ export function getStuckAccountAndOperation(
265
266
  let stuckParentAccount;
266
267
  const mainAccount = getMainAccount(account, parentAccount);
267
268
 
268
- const SUPPORTED_FAMILIES = ["ethereum"];
269
+ const SUPPORTED_FAMILIES = ["evm"];
269
270
 
270
271
  if (!SUPPORTED_FAMILIES.includes(mainAccount.currency.family)) {
271
272
  return undefined;