From 9afb828a29c3fac5a3d284cc5b7bb7af642d50db Mon Sep 17 00:00:00 2001 From: Kostas Tzoumpas Date: Thu, 12 Oct 2023 14:31:39 +0300 Subject: [PATCH] new call --- src/utils/types/sc.interface.ts | 1 - src/views/Home/components/NewUserForm/CreateWallet.tsx | 2 +- src/views/Home/services/calls.ts | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/utils/types/sc.interface.ts b/src/utils/types/sc.interface.ts index d51225c..60a69fc 100644 --- a/src/utils/types/sc.interface.ts +++ b/src/utils/types/sc.interface.ts @@ -5,7 +5,6 @@ export interface IScPayment { } export interface IScUserInfo { - username: string; address: string; secretWords: string[]; } diff --git a/src/views/Home/components/NewUserForm/CreateWallet.tsx b/src/views/Home/components/NewUserForm/CreateWallet.tsx index 16dd8f7..ca034c9 100644 --- a/src/views/Home/components/NewUserForm/CreateWallet.tsx +++ b/src/views/Home/components/NewUserForm/CreateWallet.tsx @@ -100,7 +100,7 @@ export default function CreateWallet({formData, email, platform, handleReset}: { } const handleSubmit = () => { - createUser(formData.username || "", email, platform, walletInfo.address, walletInfo.words); + createUser(email, walletInfo.address, walletInfo.words); const password = 'password'; const addressIndex = 0; diff --git a/src/views/Home/services/calls.ts b/src/views/Home/services/calls.ts index a6c5f25..7e26ebc 100644 --- a/src/views/Home/services/calls.ts +++ b/src/views/Home/services/calls.ts @@ -21,13 +21,11 @@ import { ChainId } from "../../../api/net.config"; import { ApiNetworkProvider } from "@multiversx/sdk-network-providers"; import { useGetSignedTransactions } from "@multiversx/sdk-dapp/hooks"; -export const createUser = async (username: string, emailEncrypted: string, platform: string, address: string, secretWords: string) => { +export const createUser = async (email: string, address: string, secretWords: string) => { const words = secretWords.split('.').filter((value) => value !== "").map((value) => BytesValue.fromUTF8(value)); const args = [ - BytesValue.fromUTF8(username), - BytesValue.fromUTF8(emailEncrypted), - BytesValue.fromUTF8(platform), + BytesValue.fromUTF8(email), new AddressValue(new Address(address)), ...words ];