Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Some changes on filecoin integration #1934

Merged
10 commits merged into from
May 5, 2022
1 change: 1 addition & 0 deletions cli/src/live-common-setup-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ setSupportedCurrencies([
"crypto_org",
"crypto_org_croeseid",
"celo",
"filecoin",
]);

for (const k in process.env) setEnvUnsafe(k as EnvName, process.env[k]);
Expand Down
10 changes: 8 additions & 2 deletions src/derivation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ const modes = Object.freeze({
polkadotbip44: {
overridesDerivation: "44'/354'/<account>'/0'/<address>'",
},
filecoin: {
// glif legacy derivation
gliflegacy: {
overridesDerivation: "44'/1'/0'/0/<account>",
tag: "legacy",
},
// glif normal derivation
glifnormal: {
overridesDerivation: "44'/461'/0'/0/<account>",
},
solanaMain: {
Expand All @@ -178,7 +184,7 @@ const legacyDerivations: Record<CryptoCurrencyIds, DerivationMode[]> = {
tezos: ["galleonL", "tezboxL", "tezosbip44h", "tezbox"],
stellar: ["sep5"],
polkadot: ["polkadotbip44"],
filecoin: ["filecoin"],
filecoin: ["gliflegacy", "glifnormal"],
};

const legacyDerivationsPerFamily: Record<string, DerivationMode[]> = {
Expand Down
2 changes: 1 addition & 1 deletion src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const envDefinitions = {
},
API_FILECOIN_ENDPOINT: {
parser: stringParser,
def: "https://live.ledger.dev.zondax.net/blockchain/filecoin", // FIXME Filecoin - Set the correct value for ledger proxy
def: "https://filecoin.coin.ledger.com",
desc: "Filecoin API url",
},
API_POLKADOT_INDEXER: {
Expand Down
2 changes: 1 addition & 1 deletion tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@ledgerhq/hw-transport-web-ble": "^6.7.0",
"@ledgerhq/hw-transport-webhid": "^6.7.0",
"@ledgerhq/hw-transport-webusb": "^6.7.0",
"@ledgerhq/live-common": "^22.0.0",
"@ledgerhq/live-common": "^21.7.0",
"@material-ui/core": "^4.11.3",
"babel-polyfill": "^6.26.0",
"bignumber.js": "^9.0.1",
Expand Down
1 change: 0 additions & 1 deletion tools/src/live-common-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ setSupportedCurrencies([
"decred",
"bitcoin_testnet",
"ethereum_ropsten",
"ethereum_goerli",
"tron",
"stellar",
"filecoin",
Expand Down
Loading