@@ -87,7 +87,7 @@ export const tests = async () => {
87
87
88
88
await test ( 'getAccounts' , async ( ) => {
89
89
const address = await wallet . getAddress ( )
90
- assert . equal ( address . toLowerCase ( ) , '0x1abe642a25d9f3a725f07c622abd4356646c1820' . toLowerCase ( ) , 'wallet address is correct' )
90
+ assert . equal ( address , ethers . utils . getAddress ( '0x1abe642a25d9f3a725f07c622abd4356646c1820' ) , 'wallet address is correct' )
91
91
} )
92
92
93
93
await test ( 'getWalletConfig' , async ( ) => {
@@ -98,14 +98,14 @@ export const tests = async () => {
98
98
assert . true ( config1 . chainId !== undefined , 'config1, chainId is set' )
99
99
assert . true ( config1 . threshold === 1 , 'config1, 1 threshold' )
100
100
assert . true ( config1 . signers . length === 1 , 'config1, 1 signer' )
101
- assert . true ( config1 . signers [ 0 ] . address === '0x4e37e14f5d5aac4df1151c6e8df78b7541680853 ' , 'config1, signer address' )
101
+ assert . true ( config1 . signers [ 0 ] . address === '0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853 ' , 'config1, signer address' )
102
102
assert . true ( config1 . signers [ 0 ] . weight === 1 , 'config1, signer weight' )
103
103
104
104
const config2 = allWalletConfigs [ 0 ]
105
105
assert . true ( config2 . chainId !== undefined , 'config2, chainId is set' )
106
106
assert . true ( config2 . threshold === 1 , 'config2, 1 threshold' )
107
107
assert . true ( config2 . signers . length === 1 , 'config2, 1 signer' )
108
- assert . true ( config2 . signers [ 0 ] . address === '0x4e37e14f5d5aac4df1151c6e8df78b7541680853 ' , 'config2, signer address' )
108
+ assert . true ( config2 . signers [ 0 ] . address === '0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853 ' , 'config2, signer address' )
109
109
assert . true ( config2 . signers [ 0 ] . weight === 1 , 'config2, signer weight' )
110
110
} )
111
111
@@ -118,7 +118,7 @@ export const tests = async () => {
118
118
assert . true ( state1 . chainId === 31337 , 'state1, chainId is 31337' )
119
119
assert . true ( state1 . config . threshold === 1 , 'state1, threshold' )
120
120
assert . true ( state1 . config . signers . length === 1 , 'state1, 1 signer' )
121
- assert . true ( state1 . address . toLowerCase ( ) === ( await wallet . getAddress ( ) ) . toLowerCase ( ) , 'state1, address' )
121
+ assert . true ( state1 . address === await wallet . getAddress ( ) , 'state1, address' )
122
122
// assert.true(state1.deployed, 'state1, deployed')
123
123
// assert.true(state1.publishedLatest, 'state1, publishedLatest')
124
124
} )
@@ -163,7 +163,7 @@ export const tests = async () => {
163
163
await test ( 'getSigners' , async ( ) => {
164
164
const signers = await signer . getSigners ( )
165
165
assert . true ( signers . length === 1 , 'signers, single owner' )
166
- assert . true ( signers [ 0 ] === '0x4e37e14f5d5aac4df1151c6e8df78b7541680853 ' , 'signers, check address' )
166
+ assert . true ( signers [ 0 ] === '0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853 ' , 'signers, check address' )
167
167
} )
168
168
169
169
await test ( 'signMessage on defaultChain' , async ( ) => {
@@ -193,10 +193,10 @@ export const tests = async () => {
193
193
194
194
// Recover the address / config from the signature
195
195
const walletConfig = await wallet . commands . recoverWalletConfigFromMessage ( address , message , sig , chainId )
196
- assert . true ( walletConfig . address . toLowerCase ( ) === address . toLowerCase ( ) , 'recover address' )
196
+ assert . true ( walletConfig . address === address , 'recover address' )
197
197
198
198
const singleSignerAddress = '0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853' // expected from mock-wallet owner
199
- assert . true ( singleSignerAddress . toLowerCase ( ) === walletConfig . signers [ 0 ] . address . toLowerCase ( ) , 'owner address check' )
199
+ assert . true ( singleSignerAddress === walletConfig . signers [ 0 ] . address , 'owner address check' )
200
200
} )
201
201
202
202
await test ( 'signTypedData on defaultChain' , async ( ) => {
@@ -235,10 +235,10 @@ export const tests = async () => {
235
235
236
236
// Recover config / address
237
237
const walletConfig = await wallet . commands . recoverWalletConfigFromTypedData ( address , { domain, types, message } , sig , chainId )
238
- assert . true ( walletConfig . address . toLowerCase ( ) === address . toLowerCase ( ) , 'recover address' )
238
+ assert . true ( walletConfig . address === address , 'recover address' )
239
239
240
240
const singleSignerAddress = '0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853' // expected from mock-wallet owner
241
- assert . true ( singleSignerAddress . toLowerCase ( ) === walletConfig . signers [ 0 ] . address . toLowerCase ( ) , 'owner address check' )
241
+ assert . true ( singleSignerAddress === walletConfig . signers [ 0 ] . address , 'owner address check' )
242
242
} )
243
243
244
244
await test ( 'signAuthMessage' , async ( ) => {
@@ -276,10 +276,10 @@ export const tests = async () => {
276
276
277
277
// Recover the address / config from the signature
278
278
const walletConfig = await wallet . commands . recoverWalletConfigFromMessage ( address , message , sig , chainId )
279
- assert . true ( walletConfig . address . toLowerCase ( ) === address . toLowerCase ( ) , 'recover address' )
279
+ assert . true ( walletConfig . address === address , 'recover address' )
280
280
281
281
const singleSignerAddress = '0x4e37E14f5d5AAC4DF1151C6E8DF78B7541680853' // expected from mock-wallet owner
282
- assert . true ( singleSignerAddress . toLowerCase ( ) === walletConfig . signers [ 0 ] . address . toLowerCase ( ) , 'owner address check' )
282
+ assert . true ( singleSignerAddress === walletConfig . signers [ 0 ] . address , 'owner address check' )
283
283
} )
284
284
285
285
await test ( 'getBalance' , async ( ) => {
@@ -355,9 +355,9 @@ export const tests = async () => {
355
355
356
356
// transaction is sent to the deployed wallet, if the wallet is deployed.. otherwise its sent to guestModule
357
357
if ( beforeWalletDeployed ) {
358
- assert . equal ( txReceipt . to . toLowerCase ( ) , ( await wallet . getAddress ( ) ) . toLowerCase ( ) , 'recipient is correct' )
358
+ assert . equal ( txReceipt . to , await wallet . getAddress ( ) , 'recipient is correct' )
359
359
} else {
360
- assert . equal ( txReceipt . to . toLowerCase ( ) , walletContext . guestModule . toLowerCase ( ) , 'recipient is correct' )
360
+ assert . equal ( txReceipt . to , walletContext . guestModule , 'recipient is correct' )
361
361
}
362
362
363
363
// Ensure fromAddress sent their eth
@@ -491,9 +491,9 @@ export const tests = async () => {
491
491
492
492
// confirm all account addresses are the same and correct
493
493
{
494
- assert . equal ( ( await wallet . getAddress ( ) ) . toLowerCase ( ) , await signer . getAddress ( ) , 'wallet and signer address match' )
495
- assert . equal ( ( await wallet . getAddress ( ) ) . toLowerCase ( ) , await signer2 . getAddress ( ) , 'wallet and signer2 address match' )
496
- assert . true ( ( await wallet . getAddress ( ) ) . toLowerCase ( ) !== testAccounts [ 0 ] . address . toLowerCase ( ) , 'wallet is not subkey address' )
494
+ assert . equal ( await wallet . getAddress ( ) , await signer . getAddress ( ) , 'wallet and signer address match' )
495
+ assert . equal ( await wallet . getAddress ( ) , await signer2 . getAddress ( ) , 'wallet and signer2 address match' )
496
+ assert . true ( await wallet . getAddress ( ) !== testAccounts [ 0 ] . address , 'wallet is not subkey address' )
497
497
}
498
498
499
499
// initial balances
0 commit comments