Skip to content

Commit

Permalink
Chore/april 4 fixes (#217)
Browse files Browse the repository at this point in the history
* update onboard

* block number shennanigans

* apy to apr

* switch network order

---------

Co-authored-by: jmzwar <[email protected]>
  • Loading branch information
jmzwar and jmzwar authored Apr 4, 2024
1 parent d8d50ab commit 0df4756
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion liquidity/components/Pools/PoolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const PoolCard = ({ pool, collateralTypes, liquidityPositionsById, apr }:
</>
) : (
<Th color="gray.500" fontSize="xs" lineHeight="4" pb="3" textTransform="initial">
APY
APR
</Th>
)}
<Th color="gray.500" fontSize="xs" lineHeight="4" pb="2" textTransform="initial"></Th>
Expand Down
5 changes: 3 additions & 2 deletions liquidity/lib/useBlockNumber/useBlockNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ export const useBlockNumber = () => {
}

// We take the last 8 blocks as the PnL is calculated between two blocks
// Interim take last 6 periods (last 7 blocks)
return [
block - BLOCKS * 8,
block - BLOCKS * 7,
// block - BLOCKS * 7,
block - BLOCKS * 6,
block - BLOCKS * 5,
block - BLOCKS * 4,
block - BLOCKS * 3,
block - BLOCKS * 2,
block - BLOCKS,
block,
];
};

Expand Down
26 changes: 13 additions & 13 deletions liquidity/lib/useBlockchain/useBlockchain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,6 @@ export const NetworkIcon = ({ networkId, ...props }: NetworkIconProps) => {
};

export const NETWORKS: Network[] = [
{
id: 1,
preset: 'main',
hexId: `0x${Number(1).toString(16)}`,
token: 'ETH',
name: 'mainnet',
rpcUrl: (INFURA_KEY?: string) =>
`https://mainnet.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`,
label: 'Ethereum',
isSupported: true,
publicRpcUrl: 'https://ethereum.publicnode.com',
isTestnet: false,
},
{
id: 8453,
preset: 'andromeda',
Expand All @@ -99,6 +86,19 @@ export const NETWORKS: Network[] = [
publicRpcUrl: 'https://base.publicnode.com',
isTestnet: false,
},
{
id: 1,
preset: 'main',
hexId: `0x${Number(1).toString(16)}`,
token: 'ETH',
name: 'mainnet',
rpcUrl: (INFURA_KEY?: string) =>
`https://mainnet.infura.io/v3/${INFURA_KEY ?? DEFAULT_INFURA_KEY}`,
label: 'Ethereum',
isSupported: true,
publicRpcUrl: 'https://ethereum.publicnode.com',
isTestnet: false,
},
{
id: 10,
preset: 'main',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function PositionTableHeader() {
<Th border="none" textTransform="unset" py={5}>
<Flex justifyContent="flex-end" alignItems="center">
<Text color="gray.600" fontFamily="heading" fontSize="12px" lineHeight="16px" mr={1}>
APY
APR
</Text>
<Tooltip label="???">
<InfoIcon w="12px" h="12px" />
Expand Down
4 changes: 2 additions & 2 deletions liquidity/ui/src/pages/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export function Dashboard() {
label="Aggregated Debt of all your Open Positions."
/>
<StatBox
title="APY"
title="APR"
isLoading={false}
value="14%"
label="Aggregated APY from all your positions."
label="Aggregated APR from all your positions."
/>
</Flex>
<AssetsList />
Expand Down
4 changes: 2 additions & 2 deletions liquidity/ui/src/pages/Manage/ManageStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ export const ManageStatsUi: FC<{
<Flex flexDirection="column" justifyContent="space-between" width="100%">
<Flex alignItems="center" mb="4px">
<Text color="gray.500" fontSize="xs" fontFamily="heading" lineHeight="16px">
APY
APR
</Text>
<Tooltip
label="APY is a combination of past week pool performance and rewards."
label="APR is a combination of past week pool performance and rewards."
textAlign="start"
py={2}
px={3}
Expand Down
2 changes: 1 addition & 1 deletion liquidity/ui/src/pages/Pool/CollateralSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const CollateralSectionUi: FC<{
gap={1}
color="white"
>
APY
APR
</Text>
{isAprLoading ? (
<Skeleton mt={1} w={16} h={6} />
Expand Down
2 changes: 1 addition & 1 deletion liquidity/ui/src/pages/Pools/Pools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function Pools() {
</Flex>
<Flex flexDir="column" mr="auto">
<Text fontSize="12px" color="gray.600">
APY{' '}
APR{' '}
<Tooltip label="???">
<InfoIcon w="12px" h="12px" />
</Tooltip>
Expand Down
7 changes: 4 additions & 3 deletions liquidity/ui/src/utils/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ export const onboard = init({
wallets: [
injectedModule({ displayUnavailable: [ProviderLabel.MetaMask, ProviderLabel.Trust] }),
trezorModule({
appUrl: 'https://governance.synthetix.io',
appUrl: 'https://liquidity.synthetix.eth.limo',
email: '[email protected]',
}),
ledgerModule({
projectId: 'a4aa25aa9a6ed6fd4c3b11c0cedc4b7c',
projectId: 'd6eac005846a1c3be1f8eea3a294eed9',
walletConnectVersion: 2,
}),
walletConnectModule({
version: 2,
projectId: 'a4aa25aa9a6ed6fd4c3b11c0cedc4b7c',
projectId: 'd6eac005846a1c3be1f8eea3a294eed9',
dappUrl: 'liquidity.synthetix.eth.limo',
}),
// gnosisModule(),
coinbaseModule(),
Expand Down

0 comments on commit 0df4756

Please sign in to comment.