Skip to content

Commit

Permalink
remove deprecated parts
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancwirko committed Nov 10, 2024
1 parent dbdbcca commit 6d72592
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### [0.15.1](https://github.com/xdevguild/buildo.dev/releases/tag/v0.15.1) (2024-11-10)
- remove `@multiversx/sdk-wallet`
- replace `SignableMessage` with `Message`

### [0.15.0](https://github.com/xdevguild/buildo.dev/releases/tag/v0.15.0) (2024-11-10)
- update useElven
- update Next
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ export const VerifySignature = () => {
signature,
}: z.infer<typeof formSchema>) => {
try {
const { Address, SignableMessage } = await import('@multiversx/sdk-core');
const { UserVerifier } = await import('@multiversx/sdk-wallet');
const { Address, Message, MessageComputer, UserVerifier } = await import(
'@multiversx/sdk-core'
);

const verifier = UserVerifier.fromAddress(new Address(address));
// TODO: replace signable message
const signableMessage = new SignableMessage({
message: Buffer.from(message),
const messageToVerify = new Message({
data: Buffer.from(message),
});
const serializedMessage = signableMessage.serializeForSigning();
const messageComputer = new MessageComputer();
const serializedMessage =
messageComputer.computeBytesForVerifying(messageToVerify);
const messageSignature = Buffer.from(signature, 'hex');

const verified = verifier.verify(serializedMessage, messageSignature);
Expand Down
4 changes: 3 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en">
// suppressHydrationWarning:
// https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app
<html lang="en" suppressHydrationWarning>
<body className={inter.className}>
<ElvenInit />
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "buildo.dev",
"version": "0.15.0",
"version": "0.15.1",
"author": "Julian Ćwirko <julian.io>",
"license": "MIT",
"homepage": "https://www.buildo.dev",
Expand All @@ -21,7 +21,6 @@
"@hookform/resolvers": "3.9.1",
"@multiversx/sdk-core": "13.14.1",
"@multiversx/sdk-transaction-decoder": "2.0.0",
"@multiversx/sdk-wallet": "4.6.0",
"@radix-ui/react-accordion": "1.2.1",
"@radix-ui/react-checkbox": "1.1.2",
"@radix-ui/react-dialog": "1.1.2",
Expand Down Expand Up @@ -74,4 +73,4 @@
"overrides": {
"rxjs": "7.8.1"
}
}
}

0 comments on commit 6d72592

Please sign in to comment.