@@ -4,14 +4,10 @@ import { CurrencyDenom, TNodeType } from '@nymproject/types';
4
4
import { ConfirmTx } from 'src/components/ConfirmTX' ;
5
5
import { ModalListItem } from 'src/components/Modals/ModalListItem' ;
6
6
import { SimpleModal } from 'src/components/Modals/SimpleModal' ;
7
- import { TPoolOption } from 'src/components/TokenPoolSelector' ;
8
7
import { useGetFee } from 'src/hooks/useGetFee' ;
9
- import { GatewayAmount , GatewayData , Signature } from 'src/pages/bonding/types' ;
10
- import { simulateBondGateway , simulateVestingBondGateway } from 'src/requests' ;
11
- import { TBondGatewayArgs } from 'src/types' ;
8
+ import { GatewayAmount , GatewayData } from 'src/pages/bonding/types' ;
12
9
import { BalanceWarning } from 'src/components/FeeWarning' ;
13
10
import { AppContext } from 'src/context' ;
14
- import { gatewayToTauri } from '../utils' ;
15
11
import { BondGatewayForm } from '../forms/legacyForms/BondGatewayForm' ;
16
12
17
13
const defaultGatewayValues : GatewayData = {
@@ -34,24 +30,21 @@ const defaultAmountValues = (denom: CurrencyDenom) => ({
34
30
export const BondGatewayModal = ( {
35
31
denom,
36
32
hasVestingTokens,
37
- onBondGateway,
38
33
onSelectNodeType,
39
34
onClose,
40
35
onError,
41
36
} : {
42
37
denom : CurrencyDenom ;
43
38
hasVestingTokens : boolean ;
44
- onBondGateway : ( data : TBondGatewayArgs , tokenPool : TPoolOption ) => void ;
45
39
onSelectNodeType : ( type : TNodeType ) => void ;
46
40
onClose : ( ) => void ;
47
41
onError : ( e : string ) => void ;
48
42
} ) => {
49
43
const [ step , setStep ] = useState < 1 | 2 | 3 > ( 1 ) ;
50
44
const [ gatewayData , setGatewayData ] = useState < GatewayData > ( defaultGatewayValues ) ;
51
45
const [ amountData , setAmountData ] = useState < GatewayAmount > ( defaultAmountValues ( denom ) ) ;
52
- const [ signature , setSignature ] = useState < string > ( ) ;
53
46
54
- const { fee, getFee , resetFeeState, feeError } = useGetFee ( ) ;
47
+ const { fee, resetFeeState, feeError } = useGetFee ( ) ;
55
48
const { userBalance } = useContext ( AppContext ) ;
56
49
57
50
useEffect ( ( ) => {
@@ -83,32 +76,7 @@ export const BondGatewayModal = ({
83
76
setStep ( 3 ) ;
84
77
} ;
85
78
86
- const handleUpdateSignature = async ( data : Signature ) => {
87
- setSignature ( data . signature ) ;
88
-
89
- const payload = {
90
- pledge : amountData . amount ,
91
- msgSignature : data . signature ,
92
- gateway : gatewayToTauri ( gatewayData ) ,
93
- } ;
94
-
95
- if ( amountData . tokenPool === 'balance' ) {
96
- await getFee < TBondGatewayArgs > ( simulateBondGateway , payload ) ;
97
- } else {
98
- await getFee < TBondGatewayArgs > ( simulateVestingBondGateway , payload ) ;
99
- }
100
- } ;
101
-
102
- const handleConfirm = async ( ) => {
103
- await onBondGateway (
104
- {
105
- pledge : amountData . amount ,
106
- msgSignature : signature as string ,
107
- gateway : gatewayToTauri ( gatewayData ) ,
108
- } ,
109
- amountData . tokenPool as TPoolOption ,
110
- ) ;
111
- } ;
79
+ const handleConfirm = async ( ) => { } ;
112
80
113
81
if ( fee ) {
114
82
return (
@@ -154,7 +122,6 @@ export const BondGatewayModal = ({
154
122
hasVestingTokens = { hasVestingTokens }
155
123
onValidateGatewayData = { handleUpdateGatwayData }
156
124
onValidateAmountData = { handleUpdateAmountData }
157
- onValidateSignature = { handleUpdateSignature }
158
125
onSelectNodeType = { onSelectNodeType }
159
126
/>
160
127
</ Box >
0 commit comments