Skip to content

Commit d7c47ae

Browse files
committed
chore
1 parent d1d3959 commit d7c47ae

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

gov/api.gno

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ func GetActiveProposals() []Proposal {
4343
return nil
4444
}
4545

46+
func GetProposalById(proposalID uint64) *Proposal {
47+
return &proposalsMap[proposalID]
48+
}
49+
4650
func SubmitProposalText(
4751
title string,
4852
summary string,

pool/_RPC_dry.gno

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ func DrySwap(
182182
amount1 = i256.Zero().Sub(amountSpecified, state.amountSpecifiedRemaining)
183183
}
184184

185+
pool.slot0.unlocked = true
186+
185187
if zeroForOne {
186188
if pool.balances.token1.Lt(amount1.Abs()) {
187189
// NOT ENOUGH BALANCE for output token1
@@ -199,6 +201,5 @@ func DrySwap(
199201
return "0", "0", false
200202
}
201203

202-
pool.slot0.unlocked = true
203204
return amount0.ToString(), amount1.ToString(), true
204205
}

pool/pool.gno

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,10 @@ func (pool *Pool) transferAndVerify(
484484
amount *i256.Int,
485485
isToken0 bool,
486486
) {
487+
if amount.IsZero() {
488+
return
489+
}
490+
487491
// must be negative to send token from pool to user
488492
// as point of view from pool, it is negative
489493
if !amount.IsNeg() {

0 commit comments

Comments
 (0)