@ledgerhq/hw-app-celo 6.34.2-nightly.1 → 6.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
 
2
- > @ledgerhq/hw-app-celo@6.34.2-nightly.0 build /home/runner/work/ledger-live/ledger-live/libs/ledgerjs/packages/hw-app-celo
2
+ > @ledgerhq/hw-app-celo@6.34.2 build /home/runner/work/ledger-live/ledger-live/libs/ledgerjs/packages/hw-app-celo
3
3
  > tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,18 +1,22 @@
1
1
  # @ledgerhq/hw-app-polkadot
2
2
 
3
- ## 6.34.2-nightly.1
3
+ ## 6.34.2
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies []:
8
- - @ledgerhq/hw-app-eth@6.45.17-nightly.1
7
+ - Updated dependencies [[`8936f39`](https://github.com/LedgerHQ/ledger-live/commit/8936f390edbe9cbc36ac6590b01562daf5c580e1)]:
8
+ - @ledgerhq/errors@6.25.0
9
+ - @ledgerhq/hw-app-eth@6.45.17
10
+ - @ledgerhq/hw-transport@6.31.10
9
11
 
10
- ## 6.34.2-nightly.0
12
+ ## 6.34.2-next.0
11
13
 
12
14
  ### Patch Changes
13
15
 
14
- - Updated dependencies []:
15
- - @ledgerhq/hw-app-eth@6.45.17-nightly.0
16
+ - Updated dependencies [[`8936f39`](https://github.com/LedgerHQ/ledger-live/commit/8936f390edbe9cbc36ac6590b01562daf5c580e1)]:
17
+ - @ledgerhq/errors@6.25.0-next.0
18
+ - @ledgerhq/hw-app-eth@6.45.17-next.0
19
+ - @ledgerhq/hw-transport@6.31.10-next.0
16
20
 
17
21
  ## 6.34.1
18
22
 
package/lib/Celo.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import Eth from "@ledgerhq/hw-app-eth";
2
2
  import { LegacyEncodedTx } from "@celo/wallet-base";
3
3
  import type { CeloTx, RLPEncodedTx } from "@celo/connect";
4
+ import { LedgerEthTransactionResolution } from "@ledgerhq/hw-app-eth/lib/services/types";
4
5
  /**
5
6
  * Heavily inspiried by celo-web-wallet
6
7
  * https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
7
8
  */
8
9
  export default class Celo extends Eth {
9
- signTransaction(path: string, rawTxHex: string): Promise<{
10
+ signTransaction(path: string, rawTxHex: string, resolution?: LedgerEthTransactionResolution | null): Promise<{
10
11
  s: string;
11
12
  v: string;
12
13
  r: string;
package/lib/Celo.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AAEvC,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,GAAG;IAC7B,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAczC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAGvF"}
1
+ {"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AAEvC,OAAO,EAAgB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAEzF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,GAAG;IAC7B,eAAe,CACnB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,8BAA8B,GAAG,IAAI,GACjD,OAAO,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAQzC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU3D,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAGvF"}
package/lib/Celo.js CHANGED
@@ -11,14 +11,8 @@ const wallet_base_1 = require("@celo/wallet-base");
11
11
  * https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
12
12
  */
13
13
  class Celo extends hw_app_eth_1.default {
14
- async signTransaction(path, rawTxHex) {
15
- return super.signTransaction(path, rawTxHex, {
16
- erc20Tokens: [],
17
- nfts: [],
18
- externalPlugin: [],
19
- plugin: [],
20
- domains: [],
21
- });
14
+ async signTransaction(path, rawTxHex, resolution) {
15
+ return super.signTransaction(path, rawTxHex, resolution);
22
16
  }
23
17
  // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
24
18
  // this legacy version of the app also only supported celo type 0 transactions.
@@ -28,7 +22,7 @@ class Celo extends hw_app_eth_1.default {
28
22
  const tokenInfo = (0, tokens_1.tokenInfoByAddressAndChainId)(to, chainId);
29
23
  if (tokenInfo) {
30
24
  // celo-spender-app below version 1.2.3 expected unprefixed hex strings only
31
- const dataString = `${tokenInfo.data.toString("hex")}`;
25
+ const dataString = `0x${tokenInfo.data.toString("hex")}`;
32
26
  await this.provideERC20TokenInformation(dataString);
33
27
  }
34
28
  }
package/lib/Celo.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":";;;;;AAAA,sEAAuC;AACvC,2DAA8E;AAC9E,mDAAkE;AAGlE;;;GAGG;AACH,MAAqB,IAAK,SAAQ,oBAAG;IACnC,KAAK,CAAC,eAAe,CACnB,IAAY,EACZ,QAAgB;QAEhB,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE;YAC3C,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,EAAE;YACR,cAAc,EAAE,EAAE;YAClB,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;SACZ,CAAC,CAAC;IACL,CAAC;IAED,kGAAkG;IAClG,+EAA+E;IAC/E,6GAA6G;IAC7G,iDAAiD;IACjD,KAAK,CAAC,eAAe,CAAC,EAAU,EAAE,OAAe;QAC/C,MAAM,SAAS,GAAG,IAAA,qCAA4B,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAE5D,IAAI,SAAS,EAAE,CAAC;YACd,4EAA4E;YAC5E,MAAM,UAAU,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QAC1C,OAAO,IAAA,0BAAY,EAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AA/BD,uBA+BC"}
1
+ {"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":";;;;;AAAA,sEAAuC;AACvC,2DAA8E;AAC9E,mDAAkE;AAIlE;;;GAGG;AACH,MAAqB,IAAK,SAAQ,oBAAG;IACnC,KAAK,CAAC,eAAe,CACnB,IAAY,EACZ,QAAgB,EAChB,UAAkD;QAElD,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;IAED,kGAAkG;IAClG,+EAA+E;IAC/E,6GAA6G;IAC7G,iDAAiD;IACjD,KAAK,CAAC,eAAe,CAAC,EAAU,EAAE,OAAe;QAC/C,MAAM,SAAS,GAAG,IAAA,qCAA4B,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAE5D,IAAI,SAAS,EAAE,CAAC;YACd,4EAA4E;YAC5E,MAAM,UAAU,GAAG,KAAK,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QAC1C,OAAO,IAAA,0BAAY,EAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AA1BD,uBA0BC"}
package/lib-es/Celo.d.ts CHANGED
@@ -1,12 +1,13 @@
1
1
  import Eth from "@ledgerhq/hw-app-eth";
2
2
  import { LegacyEncodedTx } from "@celo/wallet-base";
3
3
  import type { CeloTx, RLPEncodedTx } from "@celo/connect";
4
+ import { LedgerEthTransactionResolution } from "@ledgerhq/hw-app-eth/lib/services/types";
4
5
  /**
5
6
  * Heavily inspiried by celo-web-wallet
6
7
  * https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
7
8
  */
8
9
  export default class Celo extends Eth {
9
- signTransaction(path: string, rawTxHex: string): Promise<{
10
+ signTransaction(path: string, rawTxHex: string, resolution?: LedgerEthTransactionResolution | null): Promise<{
10
11
  s: string;
11
12
  v: string;
12
13
  r: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Celo.d.ts","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAA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C;IAU3D,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC;CAGvF"}
package/lib-es/Celo.js CHANGED
@@ -6,14 +6,8 @@ import { rlpEncodedTx } from "@celo/wallet-base";
6
6
  * https://github.com/celo-tools/celo-web-wallet/blob/master/src/features/ledger/CeloLedgerApp.ts
7
7
  */
8
8
  export default class Celo extends Eth {
9
- async signTransaction(path, rawTxHex) {
10
- return super.signTransaction(path, rawTxHex, {
11
- erc20Tokens: [],
12
- nfts: [],
13
- externalPlugin: [],
14
- plugin: [],
15
- domains: [],
16
- });
9
+ async signTransaction(path, rawTxHex, resolution) {
10
+ return super.signTransaction(path, rawTxHex, resolution);
17
11
  }
18
12
  // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
19
13
  // this legacy version of the app also only supported celo type 0 transactions.
@@ -23,7 +17,7 @@ export default class Celo extends Eth {
23
17
  const tokenInfo = tokenInfoByAddressAndChainId(to, chainId);
24
18
  if (tokenInfo) {
25
19
  // celo-spender-app below version 1.2.3 expected unprefixed hex strings only
26
- const dataString = `${tokenInfo.data.toString("hex")}`;
20
+ const dataString = `0x${tokenInfo.data.toString("hex")}`;
27
21
  await this.provideERC20TokenInformation(dataString);
28
22
  }
29
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Celo.js","sourceRoot":"","sources":["../src/Celo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,sBAAsB,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC;AAGlE;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,GAAG;IACnC,KAAK,CAAC,eAAe,CACnB,IAAY,EACZ,QAAgB;QAEhB,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE;YAC3C,WAAW,EAAE,EAAE;YACf,IAA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S,EAAE,CAAC;YACd,4EAA4E;YAC5E,MAAM,UAAU,GAAG,KAAK,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACzD,MAAM,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QAC1C,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/hw-app-celo",
3
- "version": "6.34.2-nightly.1",
3
+ "version": "6.34.2",
4
4
  "description": "Ledger Hardware Wallet Celo Application API",
5
5
  "keywords": [
6
6
  "Ledger",
@@ -27,17 +27,17 @@
27
27
  "types": "lib/Celo.d.ts",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@celo/connect": "^7.0.0",
31
- "@celo/contractkit": "^10.0.0",
32
- "@celo/utils": "^8.0.3",
33
- "@celo/wallet-base": "^8.0.0",
34
- "@celo/wallet-ledger": "^8.0.0",
30
+ "@celo/connect": "^6.0.2",
31
+ "@celo/contractkit": "^8.3.1",
32
+ "@celo/utils": "^7.0.0",
33
+ "@celo/wallet-base": "^6.0.3",
34
+ "@celo/wallet-ledger": "^6.0.3",
35
35
  "bip32-path": "^0.4.2",
36
36
  "rlp": "^3.0.0",
37
37
  "semver": "^7.3.5",
38
- "@ledgerhq/errors": "^6.25.0-nightly.0",
39
- "@ledgerhq/hw-app-eth": "^6.45.17-nightly.1",
40
- "@ledgerhq/hw-transport": "^6.31.10-nightly.0"
38
+ "@ledgerhq/errors": "^6.25.0",
39
+ "@ledgerhq/hw-app-eth": "^6.45.17",
40
+ "@ledgerhq/hw-transport": "^6.31.10"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/jest": "^29.5.10",
@@ -48,7 +48,7 @@
48
48
  "source-map-support": "^0.5.21",
49
49
  "ts-jest": "^29.1.1",
50
50
  "ts-node": "^10.4.0",
51
- "@ledgerhq/hw-transport-mocker": "^6.29.10-nightly.0"
51
+ "@ledgerhq/hw-transport-mocker": "^6.29.10"
52
52
  },
53
53
  "gitHead": "dd0dea64b58e5a9125c8a422dcffd29e5ef6abec",
54
54
  "scripts": {
package/src/Celo.ts CHANGED
@@ -2,6 +2,7 @@ import Eth from "@ledgerhq/hw-app-eth";
2
2
  import { tokenInfoByAddressAndChainId } from "@celo/wallet-ledger/lib/tokens";
3
3
  import { rlpEncodedTx, LegacyEncodedTx } from "@celo/wallet-base";
4
4
  import type { CeloTx, RLPEncodedTx } from "@celo/connect";
5
+ import { LedgerEthTransactionResolution } from "@ledgerhq/hw-app-eth/lib/services/types";
5
6
 
6
7
  /**
7
8
  * Heavily inspiried by celo-web-wallet
@@ -11,14 +12,9 @@ export default class Celo extends Eth {
11
12
  async signTransaction(
12
13
  path: string,
13
14
  rawTxHex: string,
15
+ resolution?: LedgerEthTransactionResolution | null,
14
16
  ): Promise<{ s: string; v: string; r: string }> {
15
- return super.signTransaction(path, rawTxHex, {
16
- erc20Tokens: [],
17
- nfts: [],
18
- externalPlugin: [],
19
- plugin: [],
20
- domains: [],
21
- });
17
+ return super.signTransaction(path, rawTxHex, resolution);
22
18
  }
23
19
 
24
20
  // celo-spender-app below version 1.2.3 used a different private key to validate erc20 token info.
@@ -30,7 +26,7 @@ export default class Celo extends Eth {
30
26
 
31
27
  if (tokenInfo) {
32
28
  // celo-spender-app below version 1.2.3 expected unprefixed hex strings only
33
- const dataString = `${tokenInfo.data.toString("hex")}`;
29
+ const dataString = `0x${tokenInfo.data.toString("hex")}`;
34
30
  await this.provideERC20TokenInformation(dataString);
35
31
  }
36
32
  }