Skip to content

Commit f37ede6

Browse files
authored
Merge pull request #2309 from AmbireTech/release/v2.93
Release / v2.93.0, v2.93.1 and v2.93.2
2 parents dba011b + 07656f6 commit f37ede6

44 files changed

Lines changed: 1449 additions & 294 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 32 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.92.2",
2+
"version": "2.93.2",
33
"name": "ambire-common",
44
"description": "Common ground for the Ambire apps",
55
"scripts": {
@@ -15,7 +15,6 @@
1515
},
1616
"dependencies": {
1717
"@ambire/signature-validator": "^1.5.0",
18-
"@ensdomains/ethers-patch-v6": "^0.0.4",
1918
"@lifi/types": "^17.7.1",
2019
"@metamask/eth-sig-util": "^8.2.0",
2120
"@safe-global/api-kit": "^4.0.1",
@@ -31,10 +30,9 @@
3130
"siwe": "3.0.0",
3231
"tldts": "7.0.17",
3332
"uuid": "9.0.0",
34-
"viem": "^2.33.3"
33+
"viem": "2.45.2"
3534
},
3635
"peerDependencies": {
37-
"@ensdomains/eth-ens-namehash": "^2.0.15",
3836
"@noble/hashes": "^1.8.0",
3937
"bip44-constants": "^128.0.0",
4038
"react": "^19.1.0",

src/consts/hardwareWallets.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ import { ExternalKey } from '../interfaces/keystore'
33
export const HARDWARE_WALLET_DEVICE_NAMES: { [key in ExternalKey['type']]: string } = {
44
ledger: 'Ledger',
55
trezor: 'Trezor',
6-
lattice: 'GridPlus'
6+
lattice: 'GridPlus',
7+
qr: 'QR-based'
78
}

src/consts/safe.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ const vOneFive = {
2121
singleton: '0xFf51A5898e281Db6DfC7855790607438dF2ca44b'
2222
}
2323

24+
/**
25+
* SimulateTxAccessor addresses by Safe version.
26+
*/
27+
export const safeSimulateTxAccessor = {
28+
['v1.3.0']: '0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da',
29+
['v1.4.1']: '0x3d4BA2E0884aa488718476ca2FB8Efc291A46199',
30+
['v1.5.0']: '0x07EfA797c55B5DdE3698d876b277aBb6B893654C'
31+
}
32+
2433
export const execTransactionAbi = [
2534
'function execTransaction(address to,uint256 value,bytes calldata data,uint8 operation,uint256 safeTxGas,uint256 baseGas,uint256 gasPrice,address gasToken,address payable refundReceiver,bytes memory signatures)'
2635
]

src/controllers/accountPicker/accountPicker.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -870,15 +870,21 @@ export class AccountPickerController extends EventEmitter implements IAccountPic
870870
const deviceIds: { [key in ExternalKey['type']]: string } = {
871871
ledger: this.#externalSignerControllers.ledger?.deviceId || '',
872872
trezor: this.#externalSignerControllers.trezor?.deviceId || '',
873-
lattice: this.#externalSignerControllers?.lattice?.deviceId || ''
873+
lattice: this.#externalSignerControllers?.lattice?.deviceId || '',
874+
qr: this.#externalSignerControllers.qr?.deviceId || ''
874875
}
875876

876877
const deviceModels: { [key in ExternalKey['type']]: string } = {
877878
ledger: this.#externalSignerControllers.ledger?.deviceModel || '',
878879
trezor: this.#externalSignerControllers.trezor?.deviceModel || '',
879-
lattice: this.#externalSignerControllers.lattice?.deviceModel || ''
880+
lattice: this.#externalSignerControllers.lattice?.deviceModel || '',
881+
qr: this.#externalSignerControllers.qr?.deviceModel || ''
880882
}
881883

884+
const masterFingerprint = this.#externalSignerControllers.qr?.masterFingerprint || ''
885+
886+
const hdPathTemplate = this.hdPathTemplate as HD_PATH_TEMPLATE_TYPE
887+
882888
const readyToAddExternalKeys = this.selectedAccountsFromCurrentSession.flatMap(
883889
({ account, accountKeys }) =>
884890
accountKeys.map(({ addr, index }, i) => ({
@@ -896,7 +902,12 @@ export class AccountPickerController extends EventEmitter implements IAccountPic
896902
deviceId: deviceIds[keyType],
897903
deviceModel: deviceModels[keyType],
898904
// always defined in the case of external keys
899-
hdPathTemplate: this.hdPathTemplate as HD_PATH_TEMPLATE_TYPE,
905+
hdPathTemplate,
906+
...(keyType === 'qr'
907+
? {
908+
masterFingerprint
909+
}
910+
: {}),
900911
index,
901912
createdAt: new Date().getTime()
902913
}
@@ -1066,7 +1077,12 @@ export class AccountPickerController extends EventEmitter implements IAccountPic
10661077
// (SMART_ACCOUNT_SIGNER_KEY_DERIVATION_OFFSET), and deriving smart
10671078
// accounts out of the private key (with another approach - salt and
10681079
// extra entropy) was creating confusion.
1069-
const shouldRetrieveSmartAccountIndices = this.keyIterator.subType !== 'private-key'
1080+
//
1081+
// + no smart accounts for QR wallets. Reasons:
1082+
// - some hws sign only if the signer is imported
1083+
// - we are generally moving in another direction
1084+
const shouldRetrieveSmartAccountIndices =
1085+
this.keyIterator.subType !== 'private-key' && this.type !== 'qr'
10701086
if (shouldRetrieveSmartAccountIndices) {
10711087
// Indices for the smart accounts.
10721088
indicesToRetrieve.push({

0 commit comments

Comments
 (0)