@0xsequence/provider 0.40.2 → 0.40.3

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.
@@ -593,19 +593,19 @@ class WalletRequestHandler {
593
593
  let sig = ''; // Message must be prefixed with "\x19Ethereum Signed Message:\n"
594
594
  // as defined by EIP-191
595
595
 
596
- message = prefixEIP191Message(message); // TODO:
596
+ const prefixedMessage = prefixEIP191Message(message); // TODO:
597
597
  // if (process.env.TEST_MODE === 'true' && this.prompter === null) {
598
598
 
599
599
  if (_this.prompter === null) {
600
600
  // prompter is null, so we'll sign from here
601
- sig = await signer.signMessage(ethers.ethers.utils.arrayify(message), chainId);
601
+ sig = await signer.signMessage(prefixedMessage, chainId);
602
602
  } else {
603
603
  const promptResultForDeployment = await _this.handleConfirmWalletDeployPrompt(_this.prompter, signer, chainId);
604
604
 
605
605
  if (promptResultForDeployment) {
606
606
  sig = await _this.prompter.promptSignMessage({
607
607
  chainId: chainId,
608
- message
608
+ message: prefixedMessage
609
609
  }, _this.connectOptions);
610
610
  }
611
611
  }
@@ -593,19 +593,19 @@ class WalletRequestHandler {
593
593
  let sig = ''; // Message must be prefixed with "\x19Ethereum Signed Message:\n"
594
594
  // as defined by EIP-191
595
595
 
596
- message = prefixEIP191Message(message); // TODO:
596
+ const prefixedMessage = prefixEIP191Message(message); // TODO:
597
597
  // if (process.env.TEST_MODE === 'true' && this.prompter === null) {
598
598
 
599
599
  if (_this.prompter === null) {
600
600
  // prompter is null, so we'll sign from here
601
- sig = await signer.signMessage(ethers.ethers.utils.arrayify(message), chainId);
601
+ sig = await signer.signMessage(prefixedMessage, chainId);
602
602
  } else {
603
603
  const promptResultForDeployment = await _this.handleConfirmWalletDeployPrompt(_this.prompter, signer, chainId);
604
604
 
605
605
  if (promptResultForDeployment) {
606
606
  sig = await _this.prompter.promptSignMessage({
607
607
  chainId: chainId,
608
- message
608
+ message: prefixedMessage
609
609
  }, _this.connectOptions);
610
610
  }
611
611
  }
@@ -589,19 +589,19 @@ class WalletRequestHandler {
589
589
  let sig = ''; // Message must be prefixed with "\x19Ethereum Signed Message:\n"
590
590
  // as defined by EIP-191
591
591
 
592
- message = prefixEIP191Message(message); // TODO:
592
+ const prefixedMessage = prefixEIP191Message(message); // TODO:
593
593
  // if (process.env.TEST_MODE === 'true' && this.prompter === null) {
594
594
 
595
595
  if (_this.prompter === null) {
596
596
  // prompter is null, so we'll sign from here
597
- sig = await signer.signMessage(ethers.utils.arrayify(message), chainId);
597
+ sig = await signer.signMessage(prefixedMessage, chainId);
598
598
  } else {
599
599
  const promptResultForDeployment = await _this.handleConfirmWalletDeployPrompt(_this.prompter, signer, chainId);
600
600
 
601
601
  if (promptResultForDeployment) {
602
602
  sig = await _this.prompter.promptSignMessage({
603
603
  chainId: chainId,
604
- message
604
+ message: prefixedMessage
605
605
  }, _this.connectOptions);
606
606
  }
607
607
  }
@@ -192,7 +192,7 @@ export declare type OpenWalletIntent = {
192
192
  method: string;
193
193
  };
194
194
  export interface MessageToSign {
195
- message?: string;
195
+ message?: Uint8Array;
196
196
  typedData?: TypedData;
197
197
  chainId?: number;
198
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/provider",
3
- "version": "0.40.2",
3
+ "version": "0.40.3",
4
4
  "description": "provider sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/provider",
6
6
  "source": "src/index.ts",
@@ -13,13 +13,13 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@0xsequence/abi": "^0.40.2",
17
- "@0xsequence/auth": "^0.40.2",
18
- "@0xsequence/config": "^0.40.2",
19
- "@0xsequence/network": "^0.40.2",
20
- "@0xsequence/transactions": "^0.40.2",
21
- "@0xsequence/utils": "^0.40.2",
22
- "@0xsequence/wallet": "^0.40.2",
16
+ "@0xsequence/abi": "^0.40.3",
17
+ "@0xsequence/auth": "^0.40.3",
18
+ "@0xsequence/config": "^0.40.3",
19
+ "@0xsequence/network": "^0.40.3",
20
+ "@0xsequence/transactions": "^0.40.3",
21
+ "@0xsequence/utils": "^0.40.3",
22
+ "@0xsequence/wallet": "^0.40.3",
23
23
  "@ethersproject/abstract-signer": "^5.5.0",
24
24
  "@ethersproject/hash": "^5.5.0",
25
25
  "@ethersproject/providers": "^5.5.1",
@@ -300,17 +300,17 @@ export class WalletRequestHandler implements ExternalProvider, JsonRpcHandler, P
300
300
 
301
301
  // Message must be prefixed with "\x19Ethereum Signed Message:\n"
302
302
  // as defined by EIP-191
303
- message = prefixEIP191Message(message)
303
+ const prefixedMessage = prefixEIP191Message(message)
304
304
 
305
305
  // TODO:
306
306
  // if (process.env.TEST_MODE === 'true' && this.prompter === null) {
307
307
  if (this.prompter === null) {
308
308
  // prompter is null, so we'll sign from here
309
- sig = await signer.signMessage(ethers.utils.arrayify(message), chainId)
309
+ sig = await signer.signMessage(prefixedMessage, chainId)
310
310
  } else {
311
311
  const promptResultForDeployment = await this.handleConfirmWalletDeployPrompt(this.prompter, signer, chainId)
312
312
  if (promptResultForDeployment) {
313
- sig = await this.prompter.promptSignMessage({ chainId: chainId, message }, this.connectOptions)
313
+ sig = await this.prompter.promptSignMessage({ chainId: chainId, message: prefixedMessage }, this.connectOptions)
314
314
  }
315
315
  }
316
316
 
package/src/types.ts CHANGED
@@ -247,7 +247,7 @@ export type OpenWalletIntent =
247
247
  | { type: 'jsonRpcRequest'; method: string }
248
248
 
249
249
  export interface MessageToSign {
250
- message?: string
250
+ message?: Uint8Array
251
251
  typedData?: TypedData
252
252
  chainId?: number
253
253
  }