diff --git a/copy-builtin-modules.js b/copy-builtin-modules.js
index 97c987e5c..b397267b1 100644
--- a/copy-builtin-modules.js
+++ b/copy-builtin-modules.js
@@ -57,7 +57,7 @@ const communityModules = [{ path: path.join(rootdir, 'node_modules/@airgap-commu
function createAirGapModule(module) {
const packageJson = require(`./${path.join(module.path, 'package.json')}`)
- const namespace = module.path.split('/').slice(-1)[0]
+ const namespace = path.basename(module.path)
const outputDir = path.join(assetsdir, `protocol_modules/${namespace}`)
const outputFile = 'index.browserify.js'
@@ -84,7 +84,8 @@ function createAirGapModule(module) {
}
function copyCommunityModule(module) {
- const namespace = module.path.split('/').slice(-1)[0]
+ console.log('MODULE PATH:', module.path)
+ const namespace = path.basename(module.path)
const outputDir = path.join(assetsdir, `protocol_modules/${namespace}`)
fs.mkdirSync(outputDir, { recursive: true })
diff --git a/src/app/app.scss b/src/app/app.scss
index 2d2a3f7d4..a23e716d6 100644
--- a/src/app/app.scss
+++ b/src/app/app.scss
@@ -129,3 +129,12 @@ pre {
.transparent {
--background: none transparent !important;
}
+
+airgap-account-item ion-label div {
+ display: block !important;
+}
+
+airgap-account-item ion-label div p {
+ text-align: left;
+ margin-left: 0;
+}
\ No newline at end of file
diff --git a/src/app/pages/account-add/account-add.page.html b/src/app/pages/account-add/account-add.page.html
index f91cd71c8..fe62baa70 100644
--- a/src/app/pages/account-add/account-add.page.html
+++ b/src/app/pages/account-add/account-add.page.html
@@ -57,6 +57,17 @@
+
+
+ Nome da conta
+
+
+
+
+
BIP-39 Passphrase
diff --git a/src/app/pages/account-add/account-add.page.ts b/src/app/pages/account-add/account-add.page.ts
index 5cc4c58c9..42ab63aee 100644
--- a/src/app/pages/account-add/account-add.page.ts
+++ b/src/app/pages/account-add/account-add.page.ts
@@ -46,6 +46,7 @@ export class AccountAddPage {
public isBip39PassphraseEnabled: boolean = BIP39_PASSPHRASE_ENABLED
public revealBip39Passphrase: boolean = false
public bip39Passphrase: string = ''
+ public accountLabel: string = ''
public isAppAdvancedMode$: Observable = this.storageService
.subscribe(VaultStorageKey.ADVANCED_MODE_TYPE)
@@ -182,12 +183,13 @@ export class AccountAddPage {
selectedProtocols.map(async (protocolWrapper: ProtocolWrapper) => {
const protocol = protocolWrapper.protocol
return {
- protocolIdentifier: await protocol.getIdentifier(),
- isHDWallet: protocolWrapper.isHDWallet,
- customDerivationPath: protocolWrapper.customDerivationPath ?? (await protocol.getStandardDerivationPath()),
- bip39Passphrase: this.bip39Passphrase,
- isActive: true
- }
+ protocolIdentifier: await protocol.getIdentifier(),
+ isHDWallet: protocolWrapper.isHDWallet,
+ customDerivationPath: protocolWrapper.customDerivationPath ?? (await protocol.getStandardDerivationPath()),
+ bip39Passphrase: this.bip39Passphrase,
+ isActive: true,
+ label: this.accountLabel
+ }
})
)
)
diff --git a/src/app/pages/account-address/account-address.page.html b/src/app/pages/account-address/account-address.page.html
index 2e363bfc5..ece784616 100644
--- a/src/app/pages/account-address/account-address.page.html
+++ b/src/app/pages/account-address/account-address.page.html
@@ -34,9 +34,19 @@ {{ protocolName }} {{ protocolSymbol }}
{{ wallet.derivationPath }}
- HD Wallet
- BIP39 passphrase
-
+
+ HD Wallet
+
+
+
+ Master Fingerprint:
+ {{ wallet.masterFingerprint }}
+
+
+
+ BIP39 Passphrase
+
+
diff --git a/src/app/pages/accounts-list/accounts-list.page.html b/src/app/pages/accounts-list/accounts-list.page.html
index faef75db0..5f7e9cf51 100644
--- a/src/app/pages/accounts-list/accounts-list.page.html
+++ b/src/app/pages/accounts-list/accounts-list.page.html
@@ -31,12 +31,12 @@
-
+
-
+
diff --git a/src/app/services/iac/iac.service.ts b/src/app/services/iac/iac.service.ts
index 2ab1c1e2c..3371e1fbb 100644
--- a/src/app/services/iac/iac.service.ts
+++ b/src/app/services/iac/iac.service.ts
@@ -330,6 +330,7 @@ export class IACService extends BaseIACService {
baseWallet.status
)
correctWallet.addresses = baseWallet.addresses
+ correctWallet.label = baseWallet.label
} catch (e) {
if (e.message === 'PROTOCOL_NOT_SUPPORTED') {
correctWallet = baseWallet
diff --git a/src/app/services/secrets/secrets.service.ts b/src/app/services/secrets/secrets.service.ts
index 8053cf181..2b5122f67 100644
--- a/src/app/services/secrets/secrets.service.ts
+++ b/src/app/services/secrets/secrets.service.ts
@@ -53,6 +53,7 @@ interface AddWalletConifg {
customDerivationPath: string
bip39Passphrase: string
isActive: boolean
+ label?: string
}
@Injectable({
providedIn: 'root'
@@ -125,6 +126,8 @@ export class SecretsService {
serializedWallet.status ?? AirGapWalletStatus.ACTIVE
)
airGapWallet.addresses = serializedWallet.addresses
+ airGapWallet.label = serializedWallet.label
+
return airGapWallet
})
)
@@ -494,8 +497,12 @@ export class SecretsService {
if (storedSecret === undefined) {
return secret
}
- const wallets: SerializedAirGapWallet[] = await Promise.all(secret.wallets.slice(0).map((wallet: AirGapWallet) => wallet.toJSON()))
- for (let i = 0; i < storedSecret.wallets.length; ++i) {
+
+ const wallets: SerializedAirGapWallet[] = await Promise.all(
+ secret.wallets.slice(0).map((wallet: AirGapWallet) => wallet.toJSON())
+ )
+
+ for (let i = 0; i < storedSecret.wallets.length; ++i) {
const serializedWallet = storedSecret.wallets[i] as unknown as SerializedAirGapWallet
const filtered: (AirGapWallet | SerializedAirGapWallet | undefined)[] = await Promise.all(
@@ -513,9 +520,20 @@ export class SecretsService {
wallets.push(serializedWallet)
}
}
+
const result = MnemonicSecret.init(secret)
- result.wallets = wallets as unknown as AirGapWallet[]
- return result
+ result.wallets = wallets.map((wallet: SerializedAirGapWallet) => {
+ const original = secret.wallets.find(
+ (w) => w.publicKey === wallet.publicKey
+ )
+
+ return {
+ ...wallet,
+ label: original?.label ?? wallet.label ?? ''
+ } as unknown as AirGapWallet
+})
+
+return result
})
)
@@ -624,6 +642,7 @@ export class SecretsService {
const addresses: string[] = await wallet.deriveAddresses(1)
wallet.addresses = addresses
+ wallet.label = config.label
return wallet
}