-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating and Minting vault account #1259
base: managed-vaults
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
public/reset.css
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should ever edit this file.
Just make sure you add the width definition to tailwind.config.js
especially since .w-140
is already in this file, 10 lines below this add.
@@ -80,6 +103,7 @@ export default function AssetsSelect(props: Props) { | |||
return selectionState | |||
} | |||
|
|||
console.log(selectedDenoms, 'selectedDenoms selectedDenoms') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log
if (!hideColumns || hideColumns.length === 0) { | ||
return columns | ||
} | ||
return columns.filter((column) => { | ||
if (!column.id) { | ||
return true | ||
} | ||
return !hideColumns.includes(column.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!hideColumns || hideColumns.length === 0) { | |
return columns | |
} | |
return columns.filter((column) => { | |
if (!column.id) { | |
return true | |
} | |
return !hideColumns.includes(column.id) | |
if (!hideColumns || hideColumns.length === 0) return columns | |
return columns.filter((column) => { | |
if (!column.id) return true | |
return !hideColumns.includes(column.id) |
@@ -46,6 +48,7 @@ export default function AccountMenuContent(props: Props) { | |||
const [isAutoLendEnabled] = useEnableAutoLendGlobal() | |||
const chainConfig = useChainConfig() | |||
|
|||
const hasVaults = false // TODO: Replace with actual vault availability check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should already be able to do this via the useAccounts
hook
Just check for vault accounts.
{/* TODO: fetch values */} | ||
<Skeleton health={23} healthFactor={2} positionBalance={BN(190000)} risk={12} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be very straight forward. There should be no difference between vault accounts and default accounts, especially regarding the fetching of values and positions.
{/* TODO: fetch values */} | ||
Risk score: {risk}/100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder. The only difference between accounts of type vault
to accounts of type default
should be the metadata and that there is a different logic for withdrawing. I don't think you need to introduce that much custom/duplicate code.
|
||
return ( | ||
<div className='flex flex-wrap w-full p-4'> | ||
{/* temporary mapping through accIds - TODO: map through vaults */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, map through accountIds, not vaults. You'll have it in your accounts array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase this file.
The chainConfig.managedVaults &&
logic doesn't work in a multi-chain environment.
The Routes component is initialized on load and doesn't re-initialize after changing chains.
So the rerouting has to take place on the page level. This has been done on develop so pleas rebase on it.
@@ -179,6 +179,7 @@ export default function PerpsSummary(props: Props) { | |||
reduceOnly: isReduceOnly, | |||
} | |||
|
|||
console.log('perpOrderParams', perpOrderParams) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log
In this PR we have logic for
creating new vault and Instantiating Contract message with all the details
minting vault address
redirecting to vault details page after mint
querying contract for vault details and checking the admin of the vault address with currently logged in wallet to see if user is owner
displaying vault description and fees from the contract
executing contract message to update/withdraw vault fee (buttons are disabled, because you can only update/withdraw the fee if there are accumulated fees)
Screen.Recording.2024-12-11.at.1.40.19.PM.mov