Skip to content

Commit

Permalink
last touches
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Sep 19, 2024
1 parent 2f930c5 commit 6feb0c6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const nextConfig = {

WS_REGIONX_COCOS_CHAIN: process.env.WS_REGIONX_COCOS_CHAIN || '',

WS_POLKADOT_RELAY_CHAIN: process.env.WS_KUSAMA_RELAY_CHAIN,
WS_POLKADOT_RELAY_CHAIN: process.env.WS_POLKADOT_RELAY_CHAIN,
WS_KUSAMA_RELAY_CHAIN: process.env.WS_KUSAMA_RELAY_CHAIN,
WS_ROCOCO_RELAY_CHAIN: process.env.WS_ROCOCO_RELAY_CHAIN,
WS_WESTEND_RELAY_CHAIN: process.env.WS_WESTEND_RELAY_CHAIN,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Panels/SaleInfoPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const SaleInfoPanel = () => {
},
right: {
label: 'Floor price',
value: saleInfo.price !== undefined ? formatBalance(saleInfo.price) : '---',
value: formatBalance(saleInfo.price),
},
}}
button={
Expand Down
25 changes: 18 additions & 7 deletions src/components/Tables/ParachainTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,24 @@ export const ParachainTable = ({
</StyledTableCell>
<StyledTableCell style={{ width: '25%' }}>
<Stack direction='row' alignItems='center' gap='1rem'>
<Image
src={logo || Unknown}
alt=''
width={32}
height={32}
style={{ borderRadius: '100%' }}
/>
{/* TODO: support font awesome icons */}
{!logo || logo?.startsWith('fa;') ? (
<Image
src={Unknown}
alt=''
width={32}
height={32}
style={{ borderRadius: '100%' }}
/>
) : (
<img
src={logo}
alt=''
width={32}
height={32}
style={{ borderRadius: '100%' }}
/>
)}
{name || 'Unknown'}
{homepage === undefined ? (
<></>
Expand Down
5 changes: 5 additions & 0 deletions src/contexts/sales/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ const SaleInfoProvider = ({ children }: Props) => {
const saleInfo = saleInfoRaw.toJSON() as SaleInfo;
// On Rococo we have `endPrice` while on Kusama we still have `price`.
saleInfo.price = saleInfo.price || (saleInfo as any).endPrice;

// https://polkadot.polkassembly.io/referenda/1172
if (network === NetworkType.POLKADOT) {
saleInfo.price = 10 * Math.pow(10, decimals);
}
setSaleInfo(saleInfo);

const config = configRaw.toJSON() as SaleConfig;
Expand Down

0 comments on commit 6feb0c6

Please sign in to comment.