Skip to content

Commit a4c8c3e

Browse files
committed
clean up
1 parent 54c8f5c commit a4c8c3e

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

x/accounts/defaults/lockup/lockup.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ var (
3434
StartTimePrefix = collections.NewPrefix(4)
3535
LockingPeriodsPrefix = collections.NewPrefix(5)
3636
OwnerPrefix = collections.NewPrefix(6)
37-
WithdrawedCoinsPrefix = collections.NewPrefix(7)
38-
UnbondEntriesPrefix = collections.NewPrefix(8)
37+
UnbondEntriesPrefix = collections.NewPrefix(7)
3938
)
4039

4140
var (
@@ -54,7 +53,6 @@ func newBaseLockup(d accountstd.Dependencies) *BaseLockup {
5453
OriginalLocking: collections.NewMap(d.SchemaBuilder, OriginalLockingPrefix, "original_locking", collections.StringKey, sdk.IntValue),
5554
DelegatedFree: collections.NewMap(d.SchemaBuilder, DelegatedFreePrefix, "delegated_free", collections.StringKey, sdk.IntValue),
5655
DelegatedLocking: collections.NewMap(d.SchemaBuilder, DelegatedLockingPrefix, "delegated_locking", collections.StringKey, sdk.IntValue),
57-
WithdrawedCoins: collections.NewMap(d.SchemaBuilder, WithdrawedCoinsPrefix, "withdrawed_coins", collections.StringKey, sdk.IntValue),
5856
UnbondEntries: collections.NewMap(d.SchemaBuilder, UnbondEntriesPrefix, "unbond_entries", collections.StringKey, codec.CollValue[lockuptypes.UnbondingEntries](d.LegacyStateCodec)),
5957
addressCodec: d.AddressCodec,
6058
headerService: d.Environment.HeaderService,
@@ -70,7 +68,6 @@ type BaseLockup struct {
7068
OriginalLocking collections.Map[string, math.Int]
7169
DelegatedFree collections.Map[string, math.Int]
7270
DelegatedLocking collections.Map[string, math.Int]
73-
WithdrawedCoins collections.Map[string, math.Int]
7471
// map val address to unbonding entries
7572
UnbondEntries collections.Map[string, lockuptypes.UnbondingEntries]
7673
addressCodec address.Codec
@@ -99,12 +96,6 @@ func (bva *BaseLockup) Init(ctx context.Context, msg *lockuptypes.MsgInitLockupA
9996
if err != nil {
10097
return nil, err
10198
}
102-
103-
// Set initial value for all locked token
104-
err = bva.WithdrawedCoins.Set(ctx, coin.Denom, math.ZeroInt())
105-
if err != nil {
106-
return nil, err
107-
}
10899
}
109100

110101
bondDenom, err := getStakingDenom(ctx)

x/accounts/defaults/lockup/periodic_locking_account.go

-6
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@ func (pva PeriodicLockingAccount) Init(ctx context.Context, msg *lockuptypes.Msg
8181
if err != nil {
8282
return nil, err
8383
}
84-
85-
// Set initial value for all withdrawed token
86-
err = pva.WithdrawedCoins.Set(ctx, coin.Denom, math.ZeroInt())
87-
if err != nil {
88-
return nil, err
89-
}
9084
}
9185

9286
bondDenom, err := getStakingDenom(ctx)

0 commit comments

Comments
 (0)