add royalty autocomplete

This commit is contained in:
user 2025-01-22 19:37:55 +03:00
parent 9c4851d35f
commit 58d2d3aa17
2 changed files with 7 additions and 1 deletions

View File

@ -11,6 +11,7 @@
},
"dependencies": {
"@hookform/resolvers": "^3.3.4",
"@ton/core": "^0.59.1",
"@tonconnect/ui-react": "^2.0.2",
"@vkruglikov/react-telegram-web-app": "^2.1.9",
"axios": "^1.6.7",

View File

@ -1,5 +1,6 @@
import { useEffect, useMemo, useState } from "react";
import { useHapticFeedback } from "@vkruglikov/react-telegram-web-app";
import { Address } from '@ton/core';
import { Input } from "~/shared/ui/input";
import { FormLabel } from "~/shared/ui/form-label";
@ -78,7 +79,11 @@ export const RoyaltyStep = ({ nextStep, prevStep }: RoyaltyStepProps) => {
useEffect(() => {
console.log('tonconnectUI', tonConnectUI)
if (tonConnectUI.account) {
setRoyalty([{ address: tonConnectUI.account.address, value: 100 }]);
setRoyalty([{ address: Address.parse(tonConnectUI.account.address).toString({
bounceable: true,
urlSafe: true,
testOnly: false,
}), value: 100 }]);
}
}, [tonConnectUI.account, setRoyalty]);