Skip to content

Commit fdde1bf

Browse files
committed
Merge branch 'develop' into chore/ddw-596-webpack-5-upgrade
2 parents f6f565e + e4e2dea commit fdde1bf

File tree

12 files changed

+260
-357
lines changed

12 files changed

+260
-357
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
1818
- Bumped vulnerable dependencies versions ([PR 2943](https://github.com/input-output-hk/daedalus/pull/2943))
19+
- Added support for Trezor firmware 2.5.1 ([PR 2991](https://github.com/input-output-hk/daedalus/pull/2991))
1920
- Added steps on how to link with `react-polymorph` and other external UI libraries ([PR 2948](https://github.com/input-output-hk/daedalus/pull/2948))
2021
- Published selfnode installers for all 3 platforms ([PR 2971](https://github.com/input-output-hk/daedalus/pull/2971))
2122

installers/common/MacInstaller.hs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ sign_cmd "$ABS_PATH/Contents/Frameworks/Electron Framework.framework/Versions/A/
151151
sign_cmd "$ABS_PATH/Contents/Resources/app/build/usb_bindings.node"
152152
sign_cmd "$ABS_PATH/Contents/Resources/app/build/HID.node"
153153
sign_cmd "$ABS_PATH/Contents/Resources/app/build/detection.node"
154-
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/keccak/bin/darwin-x64-"*"/keccak.node"
155-
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/keccak/bin/darwin-arm64-"*"/keccak.node"
156-
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/keccak/build/Release/addon.node"
157-
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/keccak/prebuilds/darwin-x64/node.napi.node"
158-
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/keccak/prebuilds/darwin-arm64/node.napi.node"
159154
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/blake-hash/prebuilds/darwin-x64/node.napi.node"
160155
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/blake-hash/prebuilds/darwin-arm64/node.napi.node"
161156
sign_cmd "$ABS_PATH/Contents/Resources/app/node_modules/blake-hash/bin/darwin-x64-"*"/blake-hash.node"
@@ -234,6 +229,7 @@ buildElectronApp darwinConfig@DarwinConfig{dcAppName, dcAppNameApp} installerCon
234229
[ "@babel"
235230
, "@protobufjs"
236231
, "@trezor"
232+
, "agent-base"
237233
, "babel-runtime"
238234
, "base-x"
239235
, "base64-js"
@@ -257,11 +253,12 @@ buildElectronApp darwinConfig@DarwinConfig{dcAppName, dcAppNameApp} installerCon
257253
, "bytebuffer"
258254
, "call-bind"
259255
, "cashaddrjs"
260-
, "cbor-web"
261256
, "clone"
262257
, "create-hash"
263258
, "create-hmac"
264259
, "cross-fetch"
260+
, "debug"
261+
, "decimal.js"
265262
, "deep-equal"
266263
, "define-properties"
267264
, "dfa"
@@ -282,13 +279,15 @@ buildElectronApp darwinConfig@DarwinConfig{dcAppName, dcAppNameApp} installerCon
282279
, "ieee754"
283280
, "inherits"
284281
, "int64-buffer"
282+
, "ip"
285283
, "is-arguments"
286284
, "is-date-object"
287285
, "is-regex"
288286
, "js-chain-libs-node"
289287
, "json-stable-stringify"
290-
, "keccak"
288+
, "jsonschema"
291289
, "linebreak"
290+
, "lodash"
292291
, "long"
293292
, "minimalistic-assert"
294293
, "minimalistic-crypto-utils"
@@ -308,12 +307,19 @@ buildElectronApp darwinConfig@DarwinConfig{dcAppName, dcAppNameApp} installerCon
308307
, "regenerator-runtime"
309308
, "regexp.prototype.flags"
310309
, "restructure"
310+
, "ripple-address-codec"
311+
, "ripple-binary-codec"
312+
, "ripple-keypairs"
313+
, "ripple-lib"
314+
, "ripple-lib-transactionparser"
311315
, "runtypes"
312316
, "safe-buffer"
313317
, "semver-compare"
318+
, "smart-buffer"
319+
, "socks"
320+
, "socks-proxy-agent"
314321
, "tiny-inflate"
315322
, "tiny-secp256k1"
316-
, "tiny-worker"
317323
, "trezor-connect"
318324
, "typeforce"
319325
, "unicode-properties"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"@types/react": "16.9.56",
105105
"@types/react-svg-inline": "2.1.3",
106106
"@types/react-table": "^7.7.9",
107+
"@types/trezor-connect": "8.1.18",
107108
"@typescript-eslint/eslint-plugin": "5.20.0",
108109
"@typescript-eslint/parser": "5.20.0",
109110
"@xarc/run": "1.1.1",
@@ -284,7 +285,7 @@
284285
"spectron-fake-dialog": "0.0.1",
285286
"tail": "2.2.4",
286287
"tcp-port-used": "1.0.1",
287-
"trezor-connect": "8.2.4-extended",
288+
"trezor-connect": "8.2.8-extended",
288289
"unorm": "1.6.0",
289290
"url": "0.11.0",
290291
"usb-detection": "4.13.0",

shell.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ let
113113
ln -svf $(type -P cardano-cli)
114114
mkdir -p ${BUILDTYPE}/
115115
${let
116-
# XXX: right now we don’t build Debug/ versions on Linux (TODO: investigate why – @michalrus)
117-
sourceBUILDTYPE = if system == "x86_64-linux" then "Release" else BUILDTYPE;
116+
# (TODO: investigate why – @michalrus)
117+
sourceBUILDTYPE = "Release";
118118
in ''
119119
ln -svf $PWD/node_modules/usb/build/${sourceBUILDTYPE}/usb_bindings.node ${BUILDTYPE}/
120120
ln -svf $PWD/node_modules/node-hid/build/${sourceBUILDTYPE}/HID.node ${BUILDTYPE}/

source/common/ipc/api.ts

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
import {
2+
CardanoSignedTxData,
3+
CardanoSignTransaction,
4+
CommonParams,
5+
Success,
6+
Unsuccessful,
7+
} from 'trezor-connect';
18
import type {
29
BugReportRequestHttpOptions,
310
BugReportRequestPayload,
@@ -32,39 +39,37 @@ import type {
3239
} from '../types/logging.types';
3340
import type { Locale } from '../types/locales.types';
3441
import type {
42+
CheckFileExistsRequest,
43+
ClearDownloadLocalDataRequest,
44+
ClearDownloadLocalDataResponse,
45+
DeleteDownloadedFileRequest,
46+
DeleteDownloadedFileResponse,
3547
DownloadLocalDataRequest,
3648
DownloadLocalDataResponse,
37-
DownloadsLocalDataRequest,
38-
DownloadsLocalDataResponse,
3949
DownloadRequest,
4050
DownloadResponse,
51+
DownloadsLocalDataRequest,
52+
DownloadsLocalDataResponse,
4153
ResumeDownloadRequest,
4254
ResumeDownloadResponse,
43-
ClearDownloadLocalDataRequest,
44-
ClearDownloadLocalDataResponse,
45-
DeleteDownloadedFileRequest,
46-
DeleteDownloadedFileResponse,
47-
CheckFileExistsRequest,
4855
} from '../types/downloadManager.types';
4956
import type { StoreMessage } from '../types/electron-store.types';
5057
import type {
5158
IntrospectAddressRequest,
5259
IntrospectAddressResponse,
5360
} from '../types/address-introspection.types';
5461
import type {
55-
HardwareWalletTransportDeviceRequest,
56-
HardwareWalletTransportDeviceResponse,
62+
HardwareWalletCardanoAdaAppResponse,
63+
HardwareWalletConnectionRequest,
5764
HardwareWalletExtendedPublicKeyRequest,
5865
HardwareWalletExtendedPublicKeyResponse,
59-
HardwareWalletCardanoAdaAppResponse,
66+
HardwareWalletTransportDeviceRequest,
67+
HardwareWalletTransportDeviceResponse,
68+
LedgerDevicePayload,
6069
LedgerSignTransactionRequest,
6170
LedgerSignTransactionResponse,
62-
TrezorSignTransactionRequest,
63-
TrezorSignTransactionResponse,
64-
HardwareWalletConnectionRequest,
65-
LedgerDevicePayload,
66-
TrezorDevicePayload,
6771
TrezorDeviceErrorPayload,
72+
TrezorDevicePayload,
6873
} from '../types/hardware-wallets.types';
6974

7075
/**
@@ -492,8 +497,11 @@ export type signTransactionLedgerRendererRequest = LedgerSignTransactionRequest;
492497
export type signTransactionLedgerMainResponse = LedgerSignTransactionResponse;
493498
export const SIGN_TRANSACTION_TREZOR_CHANNEL =
494499
'SIGN_TRANSACTION_TREZOR_CHANNEL';
495-
export type signTransactionTrezorRendererRequest = TrezorSignTransactionRequest;
496-
export type signTransactionTrezorMainResponse = TrezorSignTransactionResponse;
500+
export type signTransactionTrezorRendererRequest = CommonParams &
501+
CardanoSignTransaction;
502+
export type signTransactionTrezorMainResponse =
503+
| Success<CardanoSignedTxData>
504+
| Unsuccessful;
497505
export const GET_INIT_TREZOR_CONNECT_CHANNEL =
498506
'GET_INIT_TREZOR_CONNECT_CHANNEL';
499507
export type handleInitTrezorConnectRendererRequest = void;

source/common/types/hardware-wallets.types.ts

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -77,29 +77,6 @@ export const DeviceEvents: {
7777
UNREADABLE: 'unreadable-device',
7878
};
7979
export type AddressTypeNibble = 0 | 4 | 6 | 8 | 14;
80-
export const AddressTypeNibbles: {
81-
BASE: AddressTypeNibble;
82-
POINTER: AddressTypeNibble;
83-
ENTERPRISE: AddressTypeNibble;
84-
BYRON: AddressTypeNibble;
85-
REWARD: AddressTypeNibble;
86-
} = {
87-
BASE: 0b0000,
88-
POINTER: 0b0100,
89-
ENTERPRISE: 0b0110,
90-
BYRON: 0b1000,
91-
REWARD: 0b1110,
92-
};
93-
export type CertificateType = 0 | 1 | 2;
94-
export const CertificateTypes: {
95-
STAKE_REGISTRATION: CertificateType;
96-
STAKE_DEREGISTRATION: CertificateType;
97-
STAKE_DELEGATION: CertificateType;
98-
} = {
99-
STAKE_REGISTRATION: 0,
100-
STAKE_DEREGISTRATION: 1,
101-
STAKE_DELEGATION: 2,
102-
};
10380

10481
export type LedgerTransportDevice = {
10582
deviceId: string | null | undefined;
@@ -175,40 +152,6 @@ export type LedgerAuxiliaryDataType = {
175152
nonce: string;
176153
};
177154
};
178-
export type TrezorAuxiliaryDataType = {
179-
catalystRegistrationParameters: {
180-
votingPublicKey: string;
181-
stakingPath: string | Array<number>;
182-
rewardAddressParameters: {
183-
addressType: number;
184-
path: string;
185-
};
186-
nonce: string;
187-
};
188-
};
189-
export type TrezorSignTransactionInputType = {
190-
path: string;
191-
prev_hash: number;
192-
prev_index: number;
193-
};
194-
export type TrezorOutputTypeAddress = {
195-
address: string;
196-
amount: string;
197-
};
198-
export type TrezorOutputTypeChange = {
199-
amount: string;
200-
addressParameters: {
201-
addressType: number;
202-
path: string;
203-
stakingPath: string;
204-
};
205-
};
206-
export type TrezorSignTransactionInputsType = Array<
207-
TrezorSignTransactionInputType
208-
>;
209-
export type TrezorSignTransactionOutputsType = Array<
210-
TrezorOutputTypeAddress | TrezorOutputTypeChange
211-
>;
212155
export type Witness = {
213156
path: BIP32Path;
214157
witnessSignatureHex: string;
@@ -252,21 +195,6 @@ export type LedgerSignTransactionRequest = {
252195
auxiliaryData: LedgerAuxiliaryDataType | null | undefined;
253196
additionalWitnessPaths: Array<BIP32Path | null | undefined>;
254197
};
255-
export type TrezorSignTransactionRequest = {
256-
inputs: TrezorSignTransactionInputsType;
257-
outputs: TrezorSignTransactionOutputsType;
258-
fee?: string;
259-
ttl: string;
260-
networkId: number;
261-
protocolMagic: number;
262-
certificates: Array<Certificate | null | undefined>;
263-
withdrawals: Array<Withdrawal | null | undefined>;
264-
reset?: boolean;
265-
devicePath: string;
266-
validityIntervalStartStr?: string;
267-
signingMode: number;
268-
auxiliaryData: TrezorAuxiliaryDataType | null | undefined;
269-
};
270198
export type LedgerSignTransactionResponse = {
271199
txHashHex: string;
272200
witnesses: Array<Witness>;
@@ -282,21 +210,6 @@ export type TrezorWitness = {
282210
signature: string;
283211
chainCode: string | null | undefined;
284212
};
285-
export type TrezorSerializedTxPayload = {
286-
serializedTx: string;
287-
};
288-
export type TrezorRawTxPayload = {
289-
witnesses: Array<TrezorWitness>;
290-
auxiliaryDataSupplement?: {
291-
type: number;
292-
auxiliaryDataHash: string;
293-
catalystSignature: string;
294-
};
295-
};
296-
export type TrezorSignTransactionResponse = {
297-
success: boolean;
298-
payload: TrezorSerializedTxPayload | TrezorRawTxPayload;
299-
};
300213

301214
export type LedgerDevicePayload = {
302215
disconnected: boolean;

0 commit comments

Comments
 (0)