Commit 0afcc7d 1 parent b842111 commit 0afcc7d Copy full SHA for 0afcc7d
File tree 3 files changed +14
-2
lines changed
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
55
55
* (x/collection) [ \# 954] ( https://github.com/line/lbm-sdk/pull/954 ) Remove duplicated events in x/collection Msg/Modify
56
56
* (x/collection) [ \# 955] ( https://github.com/line/lbm-sdk/pull/955 ) Return nil where the parent not exists in x/collection Query/Parent
57
57
* (x/collection) [ \# 959] ( https://github.com/line/lbm-sdk/pull/959 ) Revert #955 and add Query/HasParent into x/collection
58
+ * (x/collection) [ \# 960] ( https://github.com/line/lbm-sdk/pull/960 ) Fix default next class ids of x/collection
58
59
59
60
### Removed
60
61
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ func (x LegacyPermission) String() string {
28
28
func DefaultNextClassIDs (contractID string ) NextClassIDs {
29
29
return NextClassIDs {
30
30
ContractId : contractID ,
31
- Fungible : sdk .NewUint (0 ),
32
- NonFungible : sdk .NewUint (1 << 28 ), // "10000000"
31
+ Fungible : sdk .NewUint (1 ),
32
+ NonFungible : sdk .NewUint (1 << 28 ). Incr () , // "10000000 + 1 "
33
33
}
34
34
}
35
35
Original file line number Diff line number Diff line change @@ -171,3 +171,14 @@ func TestParseCoins(t *testing.T) {
171
171
})
172
172
}
173
173
}
174
+
175
+ func TestDefaultNextClassIDs (t * testing.T ) {
176
+ contractID := "deadbeef"
177
+ require .Equal (t , collection.NextClassIDs {
178
+ ContractId : contractID ,
179
+ Fungible : sdk .NewUint (1 ),
180
+ NonFungible : sdk .NewUint (1 << 28 ).Incr (), // "10000000 + 1"
181
+ },
182
+ collection .DefaultNextClassIDs (contractID ),
183
+ )
184
+ }
You can’t perform that action at this time.
0 commit comments