Skip to content

Commit

Permalink
fix: taker fee parsing issue on testnet (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaddyMc authored May 7, 2024
1 parent 9f93be3 commit a04d8ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion router/usecase/routertesting/parsing/taker_fees.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sqsdomain/taker_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (tfm TakerFeeMap) MarshalJSON() ([]byte, error) {
serializedMap := map[string]osmomath.Dec{}
for key, value := range tfm {
// Convert DenomPair to a string representation
keyString := fmt.Sprintf("%s-%s", key.Denom0, key.Denom1)
keyString := fmt.Sprintf("%s|%s", key.Denom0, key.Denom1)
serializedMap[keyString] = value
}

Expand All @@ -44,7 +44,7 @@ func (tfm TakerFeeMap) UnmarshalJSON(data []byte) error {

// Convert string keys back to DenomPair
for keyString, value := range serializedMap {
parts := strings.Split(keyString, "-")
parts := strings.Split(keyString, "|")
if len(parts) != 2 {
return fmt.Errorf("invalid key format: %s", keyString)
}
Expand Down

0 comments on commit a04d8ae

Please sign in to comment.