@@ -108,7 +108,7 @@ func GenericNewWalletSingleOwner[C core.WalletConfig](owner Signer, optContext .
108108 if _ , ok := core .WalletConfig (typeOfWallet ).(* v1.WalletConfig ); ok {
109109 // new wallet config v1
110110 var config core.WalletConfig = & v1.WalletConfig {
111- Threshold_ : 1 , //big.NewInt(1),
111+ Threshold_ : 1 , // big.NewInt(1),
112112 Signers_ : v1.WalletConfigSigners {
113113 {Weight : 1 , Address : owner .Address ()},
114114 },
@@ -122,7 +122,7 @@ func GenericNewWalletSingleOwner[C core.WalletConfig](owner Signer, optContext .
122122 } else if _ , ok := core .WalletConfig (typeOfWallet ).(* v2.WalletConfig ); ok {
123123 // new wallet config v2
124124 var config core.WalletConfig = & v2.WalletConfig {
125- Threshold_ : 1 , //big.NewInt(1),
125+ Threshold_ : 1 , // big.NewInt(1),
126126 Tree : & v2.WalletConfigTreeAddressLeaf {
127127 Weight : 1 , Address : owner .Address (),
128128 },
@@ -136,7 +136,7 @@ func GenericNewWalletSingleOwner[C core.WalletConfig](owner Signer, optContext .
136136 } else if _ , ok := core .WalletConfig (typeOfWallet ).(* v3.WalletConfig ); ok {
137137 // new wallet config v3
138138 var config core.WalletConfig = & v3.WalletConfig {
139- Threshold_ : 1 , //big.NewInt(1),
139+ Threshold_ : 1 , // big.NewInt(1),
140140 Tree : & v3.WalletConfigTreeAddressLeaf {
141141 Weight : 1 , Address : owner .Address (),
142142 },
@@ -260,7 +260,6 @@ func (w *Wallet[C]) UseConfig(config C) (*Wallet[C], error) {
260260 SkipSortSigners : w .skipSortSigners ,
261261 Address : w .address ,
262262 })
263-
264263 if err != nil {
265264 return nil , fmt .Errorf ("sequence.Wallet#UseConfig: %w" , err )
266265 }
@@ -286,7 +285,6 @@ func (w *Wallet[C]) UseSigners(signers ...Signer) (*Wallet[C], error) {
286285 SkipSortSigners : w .skipSortSigners ,
287286 Address : w .address ,
288287 })
289-
290288 if err != nil {
291289 return nil , fmt .Errorf ("sequence.Wallet#UseSigners: %w" , err )
292290 }
@@ -485,9 +483,11 @@ func (w *Wallet[C]) SignTypedData(typedData *ethcoder.TypedData) ([]byte, []byte
485483 return signature , encodedTypedData , nil
486484}
487485
488- var _ MessageSigner = (* Wallet [* v1.WalletConfig ])(nil )
489- var _ MessageSigner = (* Wallet [* v2.WalletConfig ])(nil )
490- var _ MessageSigner = (* Wallet [* v3.WalletConfig ])(nil )
486+ var (
487+ _ MessageSigner = (* Wallet [* v1.WalletConfig ])(nil )
488+ _ MessageSigner = (* Wallet [* v2.WalletConfig ])(nil )
489+ _ MessageSigner = (* Wallet [* v3.WalletConfig ])(nil )
490+ )
491491
492492func (w * Wallet [C ]) SignDigest (ctx context.Context , digest common.Hash , optChainID ... * big.Int ) ([]byte , error ) {
493493 if w .sessions != nil {
@@ -612,8 +612,10 @@ func (w *Wallet[C]) SignV3Payload(ctx context.Context, payload core.Payload, opt
612612 return res , sig , err
613613}
614614
615- var _ DigestSigner = (* Wallet [* v1.WalletConfig ])(nil )
616- var _ DigestSigner = (* Wallet [* v2.WalletConfig ])(nil )
615+ var (
616+ _ DigestSigner = (* Wallet [* v1.WalletConfig ])(nil )
617+ _ DigestSigner = (* Wallet [* v2.WalletConfig ])(nil )
618+ )
617619
618620func (w * Wallet [C ]) SignTransaction (ctx context.Context , txn * Transaction ) (* SignedTransactions , error ) {
619621 return w .SignTransactions (ctx , Transactions {txn })
@@ -861,6 +863,10 @@ func (w *Wallet[C]) IsDeployed() (bool, error) {
861863}
862864
863865func (w * Wallet [C ]) Deploy (ctx context.Context , transactions ... * Transaction ) (MetaTxnID , * types.Transaction , ethtxn.WaitReceipt , error ) {
866+ return w .DeployWithImageHash (ctx , w .config .ImageHash (), transactions ... )
867+ }
868+
869+ func (w * Wallet [C ]) DeployWithImageHash (ctx context.Context , imageHash core.ImageHash , transactions ... * Transaction ) (MetaTxnID , * types.Transaction , ethtxn.WaitReceipt , error ) {
864870 if w .relayer == nil {
865871 return "" , nil , nil , ErrRelayerNotSet
866872 }
@@ -870,7 +876,7 @@ func (w *Wallet[C]) Deploy(ctx context.Context, transactions ...*Transaction) (M
870876 return "" , nil , nil , fmt .Errorf ("already deployed" )
871877 }
872878
873- walletAddress , walletFactoryAddress , deploymentData , err := EncodeWalletDeployment (w .config , w .context )
879+ walletAddress , walletFactoryAddress , deploymentData , err := EncodeWalletDeploymentWithImageHash (w .config , w .context , imageHash )
874880 if err != nil {
875881 return "" , nil , nil , err
876882 }
@@ -1046,6 +1052,10 @@ func (w *Wallet[C]) buildSignature(ctx context.Context, sign core.SigningFunctio
10461052 }
10471053 }
10481054
1055+ if len (config .PendingUpdates ) > 0 {
1056+ sig = append (v3.ChainedSignature {sig }, config .PendingUpdates ... )
1057+ }
1058+
10491059 sigEnc , err := sig .Data ()
10501060 if err != nil {
10511061 return nil , nil , fmt .Errorf ("SignDigest, sig.Data: %w" , err )
0 commit comments