@towns-protocol/contracts 0.0.411 → 0.0.412

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@towns-protocol/contracts",
3
- "version": "0.0.411",
3
+ "version": "0.0.412",
4
4
  "scripts": {
5
5
  "clean": "forge clean",
6
6
  "compile": "forge build",
@@ -33,7 +33,7 @@
33
33
  "@layerzerolabs/oapp-evm": "^0.3.2",
34
34
  "@openzeppelin/merkle-tree": "^1.0.8",
35
35
  "@prb/test": "^0.6.4",
36
- "@towns-protocol/prettier-config": "^0.0.411",
36
+ "@towns-protocol/prettier-config": "^0.0.412",
37
37
  "@wagmi/cli": "^2.2.0",
38
38
  "forge-std": "github:foundry-rs/forge-std#v1.10.0",
39
39
  "prettier": "^3.5.3",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "87399756a4f959f3b96a4161a5cea7fc9536775d"
56
+ "gitHead": "faf36d126bdccd3c15bd910d1021c04627e92961"
57
57
  }
@@ -209,9 +209,10 @@ abstract contract WalletLinkBase is IWalletLinkBase, EIP712Base, Nonces {
209
209
  revert WalletLink__NotLinked(walletToRemove, rootWallet.addr);
210
210
  }
211
211
 
212
- // Check that the wallet is not the default wallet
212
+ // If the wallet is the default wallet, unset it before removal
213
213
  if (ds.rootWalletByRootKey[rootWallet.addr].defaultWallet == walletToRemove) {
214
- revert WalletLink__CannotRemoveDefaultWallet();
214
+ ds.rootWalletByRootKey[rootWallet.addr].defaultWallet = address(0);
215
+ emit SetDefaultWallet(rootWallet.addr, address(0));
215
216
  }
216
217
 
217
218
  // Verify that the root wallet signature contains the correct nonce and the correct wallet
@@ -246,9 +247,10 @@ abstract contract WalletLinkBase is IWalletLinkBase, EIP712Base, Nonces {
246
247
  revert WalletLink__NotLinked(walletToRemove, rootWallet);
247
248
  }
248
249
 
249
- // check that the default wallet is not the wallet to remove
250
+ // If the wallet is the default wallet, unset it before removal
250
251
  if (ds.rootWalletByRootKey[rootWallet].defaultWallet == walletToRemove) {
251
- revert WalletLink__CannotRemoveDefaultWallet();
252
+ ds.rootWalletByRootKey[rootWallet].defaultWallet = address(0);
253
+ emit SetDefaultWallet(rootWallet, address(0));
252
254
  }
253
255
 
254
256
  // Remove the link in the walletToRemove to root keys map