@@ -52,6 +52,7 @@ export type V3MigrationSlice = {
5252 signedPermits ?: V3MigrationHelperSignedPermit [ ]
5353 ) => Promise < EthereumTransactionTypeExtended [ ] > ;
5454 setCurrentMarketForMigration : ( ) => void ;
55+ resetMigrationSelectedAssets : ( ) => void ;
5556} ;
5657
5758export const createV3MigrationSlice : StateCreator <
@@ -136,16 +137,19 @@ export const createV3MigrationSlice: StateCreator<
136137 } )
137138 ) ;
138139 } ,
140+ resetMigrationSelectedAssets : ( ) => {
141+ set ( {
142+ selectedMigrationBorrowAssets : { } ,
143+ selectedMigrationSupplyAssets : { } ,
144+ } ) ;
145+ } ,
139146 getApprovePermitsForSelectedAssets : async ( ) => {
140147 const timestamp = dayjs ( ) . unix ( ) ;
141148 const approvalPermitsForMigrationAssets = await Promise . all (
142149 selectUserSupplyIncreasedReservesForMigrationPermits ( get ( ) , timestamp ) . map (
143150 async ( { reserve, increasedAmount } ) : Promise < Approval > => {
144- const { getTokenData } = new ERC20Service ( get ( ) . jsonRpcProvider ( ) ) ;
145- const { decimals } = await getTokenData ( reserve . aTokenAddress ) ;
146- const convertedAmount = valueToWei ( increasedAmount , decimals ) ;
147151 return {
148- amount : convertedAmount ,
152+ amount : increasedAmount ,
149153 underlyingAsset : reserve . aTokenAddress ,
150154 permitType : 'MIGRATOR' ,
151155 } ;
0 commit comments