Add ExistenceRequirement to Currency trait (#4000)

* Added a public transfer_some function and a private transfer_inner fn

* Move transfer_some to the end of the module impl to fix failing contracts test

* Change whitespace

* Remove needless change to transfer logic

* Fix error

* Update srml/balances/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Improve documentation and add test

* Update srml/balances/src/lib.rs

Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Switch to changing Currency trait instead
This commit is contained in:
authored and Gavin Wood committed 2019-11-07 12:01:47 +01:00
1 parent e73436d818
commit 3a7b1b9da5
4 files changed
+76 -25

No files matched your search

+6 -1
View File
@@ -1096,7 +1096,12 @@ where
Zero::zero()
}
fn transfer(transactor: &T::AccountId, dest: &T::AccountId, value: Self::Balance) -> Result {
fn transfer(
transactor: &T::AccountId,
dest: &T::AccountId,
value: Self::Balance,
_: ExistenceRequirement, // no existential deposit policy for generic asset
) -> Result {
<Module<T>>::make_transfer(&U::asset_id(), transactor, dest, value)
}