File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ func GetActiveProposals() []Proposal {
43
43
return nil
44
44
}
45
45
46
+ func GetProposalById(proposalID uint64) *Proposal {
47
+ return &proposalsMap[proposalID]
48
+ }
49
+
46
50
func SubmitProposalText(
47
51
title string,
48
52
summary string,
Original file line number Diff line number Diff line change @@ -182,6 +182,8 @@ func DrySwap(
182
182
amount1 = i256.Zero().Sub(amountSpecified, state.amountSpecifiedRemaining)
183
183
}
184
184
185
+ pool.slot0.unlocked = true
186
+
185
187
if zeroForOne {
186
188
if pool.balances.token1.Lt(amount1.Abs()) {
187
189
// NOT ENOUGH BALANCE for output token1
@@ -199,6 +201,5 @@ func DrySwap(
199
201
return "0", "0", false
200
202
}
201
203
202
- pool.slot0.unlocked = true
203
204
return amount0.ToString(), amount1.ToString(), true
204
205
}
Original file line number Diff line number Diff line change @@ -484,6 +484,10 @@ func (pool *Pool) transferAndVerify(
484
484
amount *i256.Int,
485
485
isToken0 bool,
486
486
) {
487
+ if amount.IsZero() {
488
+ return
489
+ }
490
+
487
491
// must be negative to send token from pool to user
488
492
// as point of view from pool, it is negative
489
493
if !amount.IsNeg() {
You can’t perform that action at this time.
0 commit comments