This commit is contained in:
Артем 2022-11-25 13:36:38 +04:00
parent e415cfc39a
commit 1a9cac77bd

View File

@ -181,7 +181,8 @@ create(Params) ->
valid = ff_resource:check_resource(Resource), valid = ff_resource:check_resource(Resource),
CreatedAt = ff_time:now(), CreatedAt = ff_time:now(),
Method = ff_resource:method(Resource), Method = ff_resource:method(Resource),
Terms = ff_identity:get_terms(Identity, #{timestamp => CreatedAt}), TermVarset = #{currency => ff_dmsl_codec:marshal(currency_ref, CurrencyID)},
Terms = ff_identity:get_terms(Identity, #{timestamp => CreatedAt, varset => TermVarset}),
valid = unwrap(terms, ff_party:validate_destination_creation(Terms, Method)), valid = unwrap(terms, ff_party:validate_destination_creation(Terms, Method)),
Currency = unwrap(currency, ff_currency:get(CurrencyID)), Currency = unwrap(currency, ff_currency:get(CurrencyID)),
Events = unwrap(ff_account:create(ID, Identity, Currency)), Events = unwrap(ff_account:create(ID, Identity, Currency)),