refactor(cketh/ckerc20): use consistently LedgerSubaccount
#2487
+137
−89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(XC-221):
LedgerSubaccount
was introduced with #2151 to be used for events stored in stable memory and was used in particular for events related to deposits. Unfortunately, withdrawal events were already prepared to received subaccounts, but they used a different type with a different, less efficient, encoding. This PR removes the old type to only keepLedgerSubaccount
, which is in preparation of supporting subaccounts for withdrawals.Remarks:
ReceivedEthEvent
andReceivedErc20Event
with someLedgerSubaccount
value on the ckSepoliaETH minter.EthWithdrawalRequest
,Erc20WithdrawalRequest
, andReimbursementRequest
that used the old type for subaccount only had instances on the ckETH and ckSepoliaETH minter that hadNone
for value. This allows to useLedgerSubaccount
for those events in a backwards-compatible manner.