Move get_asset_outputs_for_amount and adjust_for_fee from Account to ViewOnlyAccount
Summary
This PR moves get_asset_outputs_for_amount,
get_asset_inputs_for_amount and adjust_for_fee from Account to ViewOnlyAccount trait. It seem that these two methods doesn't require a full Account and so it give more flexibility in order to implement them in other structures such as Wallet.
Now Wallet also implement these two methods. Before you were forced to build a WalletUnlocked even if you don't use the secret_key.
Breaking changes
This contains an API breaking change as some public trait as been edited:
Breaking Changes
// before
use fuels::acounts::Account;
wallet.get_asset_outputs_for_amount(...);
// after
use fuels::acounts::ViewOnlyAccount;
wallet.get_asset_outputs_for_amount(...);
Checklist
[x] All changes are covered by tests (or not applicable)
[x] All changes are documented (or not applicable)
[x] I reviewed the entire PR myself (preferably, on GH UI)
[x] I described all Breaking Changes (or there's none)
Release notes
In this release, we:
Did this and that
Summary
Breaking Changes
Checklist
[ ] All changes are covered by tests (or not applicable)
[ ] All changes are documented (or not applicable)
[ ] I reviewed the entire PR myself (preferably, on GH UI)
[ ] I described all Breaking Changes (or there's none)
Thanks @AurelienFT for his contribution.
Release notes
In this release, we:
get_asset_outputs_for_amount
andadjust_for_fee
fromAccount
toViewOnlyAccount
Summary
This PR moves
get_asset_outputs_for_amount
,get_asset_inputs_for_amount
andadjust_for_fee
fromAccount
toViewOnlyAccount
trait. It seem that these two methods doesn't require a fullAccount
and so it give more flexibility in order to implement them in other structures such asWallet
.Now
Wallet
also implement these two methods. Before you were forced to build aWalletUnlocked
even if you don't use thesecret_key
.Breaking changes
This contains an API breaking change as some public trait as been edited:
Breaking Changes
Checklist
Release notes
In this release, we:
Summary
Breaking Changes
Checklist