Skip to content

Commit

Permalink
MyRouter.Swap() error message 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tolelom committed Aug 30, 2024
1 parent ab66611 commit 6c19377
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions poc/my_router.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package poc

import (
"errors"
"fmt"
"math"
)
Expand Down Expand Up @@ -48,7 +47,7 @@ func (m *MyRouter) Swap(request SwapRequest) (SwapResult, error) {
}, nil
}

return SwapResult{}, errors.New("pool not found")
return SwapResult{}, fmt.Errorf("pool %s not found", poolName)
}

func (m *MyRouter) getReserveOfTokenFromPool(fromTokenName string, toTokenName string, pool Pool) (float64, float64) {
Expand Down

0 comments on commit 6c19377

Please sign in to comment.