@@ -35,7 +35,6 @@ pub fn PoolV3Swap() -> Element {
3535 spawn_local ( async move {
3636 calculating. set ( true ) ;
3737 let new_amount = approx_amount_out ( & amount_in. read ( ) , & token_a. read ( ) , & token_b. read ( ) , & pools. pairs . read ( ) , & pools. pool_state . read ( ) ) ;
38- log:: debug!( "New Amount out : {}" , new_amount) ;
3938 amount_out. set ( new_amount) ;
4039 calculating. set ( false ) ;
4140 } ) ;
@@ -183,11 +182,13 @@ pub fn PoolV3Swap() -> Element {
183182 button { class: "px-3 py-1 bg-white/10 rounded-lg text-white" , onclick: on_max_click, "Max" }
184183 }
185184
186- input {
187- class: "mt-4 w-full bg-transparent text-right text-2xl text-white focus:outline-none" ,
188- placeholder: "Amount" ,
189- value: "{amount_in.read()}" ,
190- oninput: move |e| amount_in. set( e. value( ) . to_string( ) )
185+ div { class: "mt-2 flex justify-end " ,
186+ input {
187+ class: "mt-4 w-1/3 bg-white/10 text-right text-2xl text-white rounded-lg px-21" ,
188+ placeholder: "Amount" ,
189+ value: "{amount_in.read()}" ,
190+ oninput: move |e| amount_in. set( e. value( ) . to_string( ) )
191+ }
191192 }
192193 }
193194
@@ -225,16 +226,18 @@ pub fn PoolV3Swap() -> Element {
225226 }
226227 }
227228 div { class: "mt-4 text-2xl text-right text-gray-200" , "out≈ {amount_out()}" }
228- div { class: "mt-4 text-2xl text-right text-gray-200" ,
229+ div { class: "mt-4 text-right text-gray-200" ,
230+ div { class: "mt-2 flex justify-end " ,
229231 input {
230- class: "mt-4 w-full bg-transparent text-right text-2xl text-white focus:outline-none " ,
232+ class: "mt-4 w-1/4 bg-white/10 text-right text-2xl text-white rounded-lg px-2 " ,
231233 value: "{slippage_percent.read()}" ,
232234 oninput: move |e| {
233235 if let Ok ( v) = e. value( ) . parse:: <f64 >( ) {
234236 slippage_percent. set( v) ;
235237 }
236238 }
237239 }
240+ }
238241 div { class: "text-sm text-gray-400" , "slippage %" }
239242 }
240243
0 commit comments