@@ -3,7 +3,6 @@ import { Client } from '@mintlayer/sdk'
33import { useContext , useEffect , useState } from 'react'
44import { AccountContext , SettingsContext } from '@Contexts'
55import { AppInfo } from '@Constants'
6- import { useNavigate } from 'react-router-dom'
76
87class InMemoryAccountProvider {
98 constructor ( addresses ) {
@@ -28,6 +27,7 @@ class InMemoryAccountProvider {
2827 }
2928
3029 async request ( params ) {
30+ console . log ( 'params' , params )
3131 throw new Error ( 'Signing not supported in InMemoryAccountProvider' )
3232 }
3333}
@@ -37,7 +37,6 @@ export const SignTransactionPage = () => {
3737 const [ to , setTo ] = useState ( '' )
3838 const [ amount , setAmount ] = useState ( '' )
3939
40- const navigate = useNavigate ( )
4140 const { addresses } = useContext ( AccountContext )
4241 const { networkType } = useContext ( SettingsContext )
4342
@@ -69,19 +68,11 @@ export const SignTransactionPage = () => {
6968 } , [ currentMlAddresses . mlReceivingAddresses ] )
7069
7170 const handleSend = async ( ) => {
72- const transaction = await client . buildTransaction ( {
73- type : 'Transfer' ,
74- params : {
75- to : to ,
76- amount : amount , // Example amount in satoshis
77- } ,
78- } )
79- navigate ( '/wallet/Mintlayer/sign-transaction' , {
80- state : {
81- action : 'signTransaction' ,
82- request : { action : 'signTransaction' , data : { txData : transaction } } ,
83- } ,
71+ const transaction_signed = await client . transfer ( {
72+ to : to ,
73+ amount : amount ,
8474 } )
75+ console . log ( 'transaction_signed' , transaction_signed )
8576 }
8677
8778 return (
0 commit comments