Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 committed Dec 1, 2021
1 parent adc6809 commit e3b2920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dex/order/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ func (t *Trade) FromAccount() string {
if len(t.Coins) == 0 {
return "no coins?"
}
// The coin ID should be the UTF-8 encoded address string, not the address
// byte-array. t.Coins[0] = []byte(addrStr).
return string(t.Coins[0])
}

Expand Down
3 changes: 3 additions & 0 deletions server/asset/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ type Backend interface {
CheckAddress(string) bool
// ValidateCoinID checks the coinID to ensure it can be decoded, returning a
// human-readable string if it is valid.
// Note: ValidateCoinID is NOT used for funding coin IDs for account-based
// assets. This rule is only enforced by code patterns right now, but we may
// consider adding separate methods in the future.
ValidateCoinID(coinID []byte) (string, error)
// ValidateContract ensures that the swap contract is constructed properly
// for the asset.
Expand Down

0 comments on commit e3b2920

Please sign in to comment.