Skip to content

Commit 304cf0e

Browse files
authored
Implement AsRef for ICS-20 Amount type (#685)
* make inner type public * changelog * change to AsRef instead of `pub` field
1 parent af24f4a commit 304cf0e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Token transfer: Make `Amount` type less restrictive
2+
([#684](https://github.com/cosmos/ibc-rs/issues/684))

crates/ibc/src/applications/transfer/amount.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ impl Amount {
2121
}
2222
}
2323

24+
impl AsRef<U256> for Amount {
25+
fn as_ref(&self) -> &U256 {
26+
&self.0
27+
}
28+
}
29+
2430
impl FromStr for Amount {
2531
type Err = TokenTransferError;
2632

0 commit comments

Comments
 (0)