File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
libs/shell/services-pages/src/lib
create-vesting-account-page Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -343,8 +343,8 @@ function CreateVestingAccountForm() {
343343 placeholder = "Deposit amount in ISLM"
344344 value = { amount . toString ( ) }
345345 onChange = { ( value ) => {
346- const nextValue = ! Number . isNaN ( Number . parseInt ( value ) )
347- ? Number . parseInt ( value )
346+ const nextValue = ! Number . isNaN ( Number . parseFloat ( value ) )
347+ ? Number . parseFloat ( value )
348348 : 0 ;
349349 setAmount ( nextValue ) ;
350350 } }
@@ -488,7 +488,7 @@ function Input({
488488 required
489489 id = { id }
490490 name = { id }
491- value = { value }
491+ defaultValue = { value }
492492 onChange = { ( event ) => {
493493 onChange ( event . currentTarget . value ) ;
494494 } }
Original file line number Diff line number Diff line change @@ -80,8 +80,9 @@ export function useVestingActions() {
8080 const periods = vestingInDays ;
8181 const denom = 'aISLM' ;
8282 const lockupPeriods = [ ] ;
83- let restAmount = amount ;
84- let unlockAmount = Math . floor ( amount / periods ) ;
83+ const aislmAmount = BigInt ( amount * 10 ** 18 ) ;
84+ let restAmount = aislmAmount ;
85+ let unlockAmount = aislmAmount / BigInt ( periods ) ;
8586 let length : number = cliff ;
8687
8788 for ( let i = 0 ; i < periods ; i ++ ) {
@@ -91,7 +92,7 @@ export function useVestingActions() {
9192
9293 const unlockCoins = {
9394 denom : denom ,
94- amount : BigInt ( unlockAmount * 10 ** 18 ) . toString ( ) ,
95+ amount : unlockAmount . toString ( ) ,
9596 } ;
9697
9798 const period = {
You can’t perform that action at this time.
0 commit comments