Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
Develop

See merge request papers/airgap/airgap-vault!518
  • Loading branch information
isordo committed Sep 20, 2024
2 parents e30447e + 1441b75 commit a5eba41
Show file tree
Hide file tree
Showing 9 changed files with 417 additions and 402 deletions.
356 changes: 178 additions & 178 deletions package-lock.json

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,49 +36,49 @@
"apply-diagnostic-modules": "node apply-diagnostic-modules.js"
},
"resolutions": {
"@airgap/aeternity": "0.13.32",
"@airgap/acurast": "0.13.32",
"@airgap/astar": "0.13.32",
"@airgap/bitcoin": "0.13.32",
"@airgap/coinlib-core": "0.13.32",
"@airgap/coreum": "0.13.32",
"@airgap/cosmos": "0.13.32",
"@airgap/cosmos-core": "0.13.32",
"@airgap/crypto": "0.13.32",
"@airgap/ethereum": "0.13.32",
"@airgap/groestlcoin": "0.13.32",
"@airgap/icp": "0.13.32",
"@airgap/module-kit": "0.13.32",
"@airgap/moonbeam": "0.13.32",
"@airgap/optimism": "0.13.32",
"@airgap/polkadot": "0.13.32",
"@airgap/serializer": "0.13.32",
"@airgap/substrate": "0.13.32",
"@airgap/tezos": "0.13.32"
"@airgap/aeternity": "0.13.33",
"@airgap/acurast": "0.13.33",
"@airgap/astar": "0.13.33",
"@airgap/bitcoin": "0.13.33",
"@airgap/coinlib-core": "0.13.33",
"@airgap/coreum": "0.13.33",
"@airgap/cosmos": "0.13.33",
"@airgap/cosmos-core": "0.13.33",
"@airgap/crypto": "0.13.33",
"@airgap/ethereum": "0.13.33",
"@airgap/groestlcoin": "0.13.33",
"@airgap/icp": "0.13.33",
"@airgap/module-kit": "0.13.33",
"@airgap/moonbeam": "0.13.33",
"@airgap/optimism": "0.13.33",
"@airgap/polkadot": "0.13.33",
"@airgap/serializer": "0.13.33",
"@airgap/substrate": "0.13.33",
"@airgap/tezos": "0.13.33"
},
"dependencies": {
"@airgap/aeternity": "0.13.32",
"@airgap/acurast": "0.13.32",
"@airgap/angular-core": "0.0.48",
"@airgap/angular-ngrx": "0.0.48",
"@airgap/astar": "0.13.32",
"@airgap/bitcoin": "0.13.32",
"@airgap/coinlib-core": "0.13.32",
"@airgap/coreum": "0.13.32",
"@airgap/cosmos": "0.13.32",
"@airgap/cosmos-core": "0.13.32",
"@airgap/crypto": "0.13.32",
"@airgap/ethereum": "0.13.32",
"@airgap/groestlcoin": "0.13.32",
"@airgap/icp": "0.13.32",
"@airgap/module-kit": "0.13.32",
"@airgap/moonbeam": "0.13.32",
"@airgap/optimism": "0.13.32",
"@airgap/polkadot": "0.13.32",
"@airgap/aeternity": "0.13.33",
"@airgap/acurast": "0.13.33",
"@airgap/angular-core": "0.0.49",
"@airgap/angular-ngrx": "0.0.49",
"@airgap/astar": "0.13.33",
"@airgap/bitcoin": "0.13.33",
"@airgap/coinlib-core": "0.13.33",
"@airgap/coreum": "0.13.33",
"@airgap/cosmos": "0.13.33",
"@airgap/cosmos-core": "0.13.33",
"@airgap/crypto": "0.13.33",
"@airgap/ethereum": "0.13.33",
"@airgap/groestlcoin": "0.13.33",
"@airgap/icp": "0.13.33",
"@airgap/module-kit": "0.13.33",
"@airgap/moonbeam": "0.13.33",
"@airgap/optimism": "0.13.33",
"@airgap/polkadot": "0.13.33",
"@airgap/sapling-wasm": "0.0.7",
"@airgap/serializer": "0.13.32",
"@airgap/substrate": "0.13.32",
"@airgap/tezos": "0.13.32",
"@airgap/serializer": "0.13.33",
"@airgap/substrate": "0.13.33",
"@airgap/tezos": "0.13.33",
"@airgap-community/iso-rootstock": "1.0.0",
"@angular/cdk": "^14.2.7",
"@angular/common": "16.1.1",
Expand Down
8 changes: 7 additions & 1 deletion src/app/pages/account-address/account-address.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ const specterwallet = {
qrType: QRType.BC_UR
}

const nunchukwallet = {
icon: 'nunchuk.png',
name: 'Nunchuk Wallet',
qrType: QRType.BC_UR
}

const metamask = {
icon: 'metamask.webp',
name: 'MetaMask',
Expand Down Expand Up @@ -132,7 +138,7 @@ export class AccountAddressPage {

switch (protocolIdentifier) {
case MainProtocolSymbols.BTC_SEGWIT:
this.syncOptions = [airgapwallet, bluewallet, sparrowwallet, specterwallet]
this.syncOptions = [airgapwallet, bluewallet, sparrowwallet, specterwallet, nunchukwallet]
break
case MainProtocolSymbols.ETH:
case MainProtocolSymbols.OPTIMISM:
Expand Down
22 changes: 14 additions & 8 deletions src/app/pages/select-account/select-account.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,27 @@ export class SelectAccountPage {
this.placeholder = this.translateService.instant(`select-account.${type}.placeholder`)

this.secretsService.getSecretsObservable().subscribe(async (secrets: MnemonicSecret[]) => {
const wallets: (AirGapWallet | undefined)[][] = await Promise.all(secrets.map((secret) => Promise.all(
secret.wallets.map(async (wallet: AirGapWallet) => {
return wallet.status === AirGapWalletStatus.ACTIVE && (!this.symbolFilter || (await wallet.protocol.getIdentifier() === this.symbolFilter))
? wallet
: undefined
})
)))
const wallets: (AirGapWallet | undefined)[][] = await Promise.all(
secrets.map((secret) =>
Promise.all(
secret.wallets.map(async (wallet: AirGapWallet) => {
wallet.label = secret.label
return wallet.status === AirGapWalletStatus.ACTIVE &&
(!this.symbolFilter || (await wallet.protocol.getIdentifier()) === this.symbolFilter)
? wallet
: undefined
})
)
)
)

this.wallets = flattened(wallets).filter((wallet: AirGapWallet | undefined) => wallet !== undefined)
})
}

public async setWallet(wallet: AirGapWallet) {
this.modalController
.dismiss(this.navParams.get('type') === 'message-signing' ? (await wallet.protocol.getIdentifier()) : wallet) // TODO: change to always return wallet, but it will require a change wherever the "message-signing" is used
.dismiss(this.navParams.get('type') === 'message-signing' ? await wallet.protocol.getIdentifier() : wallet) // TODO: change to always return wallet, but it will require a change wherever the "message-signing" is used
.catch((err) => console.error(err))
}

Expand Down
12 changes: 5 additions & 7 deletions src/app/services/iac/iac.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ import {
UiEventElementsService,
UiEventService
} from '@airgap/angular-core'
import {
AirGapWallet,
AirGapWalletStatus,
MainProtocolSymbols,
UnsignedTransaction
} from '@airgap/coinlib-core'
import { AirGapWallet, AirGapWalletStatus, MainProtocolSymbols, UnsignedTransaction } from '@airgap/coinlib-core'
import { Inject, Injectable } from '@angular/core'

import { SignTransactionInfo } from '../../models/sign-transaction-info'
Expand Down Expand Up @@ -210,7 +205,10 @@ export class IACService extends BaseIACService {
}

// ETH: MetaMask requests don't contain the public key information, we need to do the matching based on the sourceFingerprint
if (!correctWallet && (signTransactionRequest.protocol === MainProtocolSymbols.ETH || signTransactionRequest.protocol === MainProtocolSymbols.OPTIMISM)) {
if (
!correctWallet &&
(signTransactionRequest.protocol === MainProtocolSymbols.ETH || signTransactionRequest.protocol === MainProtocolSymbols.OPTIMISM)
) {
const transaction: RawTypedEthereumTransaction = unsignedTransaction.transaction

const fingerprint = transaction.masterFingerprint ?? metadata.sourceFingerprint
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@
"psbt": {
"title": "Select Account",
"heading": "Please select an account to sign this PSBT with",
"placeholder": "Search by identifier"
"placeholder": "Search by label"
}
},
"unsigned-transaction": {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@
"psbt": {
"title": "Select Account",
"heading": "Please select an account to sign this PSBT with",
"placeholder": "Search by identifier"
"placeholder": "Search by label"
}
},
"unsigned-transaction": {
Expand Down
Binary file added src/assets/logos/nunchuk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a5eba41

Please sign in to comment.