17.0.0 (2022-09-21)
Bug Fixes
- 🐛 fix bug where only the default signer was used (#831) (c04d5e4)
- 🐛 improve the typing of
splitTransactions
(83a7af7)
Features
- 🎸 allow for exempted identities to be removed (5036a1d)
- 🎸 release elimination of transaction queues (#828) (7d5a11b), closes #785
- 🎸 use a more specific type for onStatusChange in txBase (#829) (32bf5d9)
- 🎸 remove Transaction Queues
TheTransactionQueue
class has been removed. Most of its methods have been moved over to
PolymeshTransaction
andPolymeshTransactionBatch
. Methods that returned aTransactionQueue
(all endpoints that write to the blockchain, such assdk.assets.registerTicker
) now return
either aPolymeshTransaction
orPolymeshTransactionBatch
. This means that all operations
in the SDK are now atomic and not prone to race conditions or half-states
- The
onProcessedByMiddleware
method has been moved toPolymeshTransaction
and
PolymeshTransactionBase
- The
Fees
interface now contains atotal
property which is the sum offree
andlocked
- The
PayingAccountType
enum now includes aCaller
member, to represent cases
where the calling Account has to pay for a transaction’s fees
BREAKING CHANGES
- 🧨 non passed exempted identities are removed when calling
setTransferRestriction - 🧨 remove Transaction Queues
- Remove the
inputArgs
property fromPolymeshTransaction
. Replaced by theargs
property. Arguments forPolymeshTransaction
andPolymeshTransactionBatch
are now
available at any point in time (previously they could depend on the result of a previous
transaction in the queue) - Remove the
isCritical
property from bothPolymeshTransaction
andPolymeshTransactionBatch
.
It no longer makes sense without Transaction Queues - Change the
run
method inPolymeshTransaction
andPolymeshTransactionBatch
to work similarly
to therun
method inTransactionQueue
. The method will check if the caller account has
enough balance for fees, the transaction will be run and its status updated. The method returns
a Promise that resolves to the result of running the transaction. For example, callingrun
on
the transaction returned byasset.registerTicker
will return a Promise that resolves to a
TickerReservation
entity - Change the argument received by the callback passed to
onStatusChange
to
PolymeshTransactionBase
. If type refinement is required, theisPolymeshTransaction
andisPolymeshTransactionBatch
typeguards can be used (they can be imported fromtypes
) - Change the return type of
getFees
inPolymeshTransaction
andPolymeshTransactionBatch
toPayingAccountFees
, which contains details about the Account that will pay for the fees,
its remaining balance (before paying), and the fees themselves - Remove the
getPayingAccount
method fromPolymeshTransaction
andPolymeshTransactionBatch
.
Its result is now contained ingetFees
- Change the
PayingAccount
type to now only containallowance: BigNumber
whentype
is
Subsidy
. ForCaller
andOther
, there is noallowance
- Rename
getFees
togetTotalFees
inPolymeshTransaction
andPolymeshTransactionBatch
- Remove the