wowok 1.4.22 → 1.4.23
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 +1 -1
- package/src/index.ts +2 -1
- package/src/treasury.ts +4 -4
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/treasury.ts
CHANGED
|
@@ -99,7 +99,7 @@ export class Treasury {
|
|
|
99
99
|
if (from_object && !IsValidAddress(from_object)) {
|
|
100
100
|
ERROR(Errors.IsValidAddress, 'deposit.from_object')
|
|
101
101
|
}
|
|
102
|
-
if (index !== undefined && IsValidU64(index)) {
|
|
102
|
+
if (index !== undefined && !IsValidU64(index)) {
|
|
103
103
|
ERROR(Errors.InvalidParam, 'deposit.index')
|
|
104
104
|
}
|
|
105
105
|
const for_obj = this.txb.pure.option('address', for_object ?? undefined);
|
|
@@ -116,7 +116,7 @@ export class Treasury {
|
|
|
116
116
|
})
|
|
117
117
|
} else {
|
|
118
118
|
return this.txb.moveCall({
|
|
119
|
-
target:Protocol.Instance().TreasuryFn('
|
|
119
|
+
target:Protocol.Instance().TreasuryFn('deposit') as FnCallType,
|
|
120
120
|
arguments:[Protocol.TXB_OBJECT(this.txb, this.object), Protocol.TXB_OBJECT(this.txb, coin),
|
|
121
121
|
this.txb.pure.string(tips), for_obj, idx, from_obj, this.txb.object(clock), Protocol.TXB_OBJECT(this.txb, this.permission)],
|
|
122
122
|
typeArguments:[this.token_type],
|
|
@@ -137,7 +137,7 @@ export class Treasury {
|
|
|
137
137
|
if (from_object && !IsValidAddress(from_object)) {
|
|
138
138
|
ERROR(Errors.IsValidAddress, 'free_deposit.from_object')
|
|
139
139
|
}
|
|
140
|
-
if (index !== undefined && IsValidU64(index)) {
|
|
140
|
+
if (index !== undefined && !IsValidU64(index)) {
|
|
141
141
|
ERROR(Errors.InvalidParam, 'free_deposit.index')
|
|
142
142
|
}
|
|
143
143
|
const for_obj = this.txb.pure.option('address', for_object ?? undefined);
|
|
@@ -166,7 +166,7 @@ export class Treasury {
|
|
|
166
166
|
if (to_object && !IsValidAddress(to_object)) {
|
|
167
167
|
ERROR(Errors.IsValidAddress, 'withdraw.to_object')
|
|
168
168
|
}
|
|
169
|
-
if (index !== undefined && IsValidU64(index)) {
|
|
169
|
+
if (index !== undefined && !IsValidU64(index)) {
|
|
170
170
|
ERROR(Errors.InvalidParam, 'withdraw.index')
|
|
171
171
|
}
|
|
172
172
|
const for_obj = this.txb.pure.option('address', for_object ?? undefined);
|