Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Adapt PolkadotJS (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier authored Jan 19, 2023
1 parent 77f399d commit a266d90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pallet/account-migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,13 @@ pub enum ExistenceReason {
/// Build a Darwinia account migration message.
pub fn sr25519_signable_message(spec_name: &[u8], account_id_20: &AccountId20) -> Vec<u8> {
[
b"I authorize the migration to ",
b"<Bytes>I authorize the migration to ",
array_bytes::bytes2hex("0x", account_id_20.0).as_bytes(),
b", an unused address on ",
spec_name,
b". Sign this message to authorize using the Substrate key associated with the account on ",
&spec_name[..spec_name.len() - 1],
b" that you wish to migrate.",
b" that you wish to migrate.</Bytes>",
]
.concat()
}
Expand Down
2 changes: 1 addition & 1 deletion pallet/account-migration/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn sr25519_signable_message_should_work() {
assert_eq!(
sr25519_signable_message(s.as_bytes(), &Default::default()),
format!(
"I authorize the migration to {}, an unused address on {}. Sign this message to authorize using the Substrate key associated with the account on {} that you wish to migrate.",
"<Bytes>I authorize the migration to {}, an unused address on {}. Sign this message to authorize using the Substrate key associated with the account on {} that you wish to migrate.</Bytes>",
"0x0000000000000000000000000000000000000000",
s,
&s[..s.len() - 1],
Expand Down

0 comments on commit a266d90

Please sign in to comment.