before_register_account

@extendable function before_register_account(account_id: byte_array)(source)

Extendable function that allows the developer to add more functionality to the register_account function, before the registration happens.

This allows, for example, to add fees on registration or check that any given condition is present before the registration can be completed.

If this function throws an exception, the registration will not happen.

When using the transfer submodule, the strategies defined there already implement extensions of this function, requiring no additional code from the developer. This function should only be extended if functionality that is not found in the predefined strategies is required.

In some cases, creating a new strategy is a better alternative: this function will run on all account registrations, regardless of the strategy they used.

Throws if any extension of this function throws.

Parameters

account_id

the ID of the account that will be registered