Conversation
Collaborator
Author
|
Переношу переименование в #170: замечание пришло по нему, и он уже правит те же файлы. Отдельный PR не нужен. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
SHIELD_TO_POOLsays the same thing twice: shielding is moving funds into the shielded pool. The half that carries information is missing - where the funds come from, which is one of the wallet's own Platform addresses and is even a parameter of the call.It also breaks the symmetry of its neighbours.
UNSHIELD_TO_ADDRESSandWITHDRAW_SHIELDED_TO_COREare named after the transparent side of the operation, which for shielding is the source. AndUNSHIELD_TO_ADDRESSdoes not say which address, although leaving the pool for a Core address is a different method entirely.The SDK itself calls the transition plainly
shield, without repeating the pool.Changes
SHIELD_TO_POOL→SHIELD_FROM_PLATFORM_ADDRESS, handlerShieldFromPlatformAddressHandler, payload and response renamed to match, file renamed.UNSHIELD_TO_ADDRESS→UNSHIELD_TO_PLATFORM_ADDRESS, same treatment.shieldFromPlatformAddressandunshieldToPlatformAddress. The old names stay as@deprecatedone-line aliases that delegate to them, so every existing caller keeps working and the UI needs no change in this PR.All the shielded methods now read by one rule: they name the transparent side, and the naming lines up with the new funding methods (
REGISTER_IDENTITY_FROM_PLATFORM_ADDRESS,TOP_UP_IDENTITY_FROM_PLATFORM_ADDRESS).Backend only - no UI changes.
Testing
tsc --noEmit,ts-standard,npm run buildjest: 42 suites, 361/361. The handler spec moved with its file and now coversShieldFromPlatformAddressHandler.grepfinds no remaining reference to the old messaging methods or handler names outside the deprecated client aliases.