@@ -41,6 +41,8 @@ import ICON_Address from "../../component/SVG/ICON_Address";
4141import ICON_Wallet from "../../component/SVG/ICON_Wallet" ;
4242import Toast from "../../component/Toast" ;
4343import styles from "./index.module.scss" ;
44+ import { decryptData , encryptData } from "@/utils/fore" ;
45+ import { node_public_keys , react_private_keys } from "../../../../config" ;
4446
4547const SendPage = ( { } ) => {
4648 const dispatch = useDispatch ( ) ;
@@ -313,19 +315,22 @@ const SendPage = ({}) => {
313315 isNewAccount : fundNewAccountStatus ,
314316 gqlUrl : currentNode . url ,
315317 } ;
316- const buildData = await buildTokenBody ( buildTokenData ) ;
318+ const data = encryptData ( JSON . stringify ( buildTokenData ) , node_public_keys ) ; // 这里用测试的
319+ const buildData = await buildTokenBody ( data ) ;
317320 if ( buildData . unSignTx ) {
321+ let realUnSignTxStr = decryptData ( buildData . unSignTx . encryptedData , buildData . unSignTx . encryptedAESKey , buildData . unSignTx . iv , react_private_keys ) ;
322+ let realUnSignTx = JSON . stringify ( realUnSignTxStr )
318323 const checkChangeStatus = verifyTokenCommand (
319324 buildTokenData ,
320325 token . tokenId ,
321- buildData . unSignTx
326+ realUnSignTx
322327 ) ;
323328 if ( ! checkChangeStatus ) {
324329 setConfirmBtnStatus ( false ) ;
325330 Toast . info ( i18n . t ( "buildFailed" ) ) ;
326331 return ;
327332 }
328- return buildData . unSignTx ;
333+ return realUnSignTx ;
329334 } else {
330335 setConfirmBtnStatus ( false ) ;
331336 Toast . info ( buildData . error || String ( buildData ) ) ;
0 commit comments