File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Changelog](https://keepachangelog.com/en/1.1.0).
99
1010### Added
1111
12+ - Add ` insert_ada_mut ` to ` Value `
1213- Add ` insert_token_mut ` to ` Value `
1314
1415## v3.0.4
Original file line number Diff line number Diff line change @@ -262,6 +262,14 @@ impl Value {
262262 self . get_token_amount ( & CurrencySymbol :: Ada , & TokenName :: ada ( ) )
263263 }
264264
265+ /// Insert ada into a value by inserting or replacing old value
266+ pub fn insert_ada_mut ( & mut self , amount : BigInt ) {
267+ self . 0 . insert (
268+ CurrencySymbol :: Ada ,
269+ BTreeMap :: from ( [ ( TokenName :: ada ( ) , amount) ] ) ,
270+ ) ;
271+ }
272+
265273 /// Create a new value by inserting a new token or replacing the existing quantity.
266274 pub fn insert_token (
267275 & self ,
You can’t perform that action at this time.
0 commit comments