Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/LW-9250-Stake…
Browse files Browse the repository at this point in the history
…-pools-sort-filter
  • Loading branch information
przemyslaw-wlodek committed Feb 20, 2024
2 parents 32489b8 + f18d564 commit dc1d8a2
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 49 deletions.
6 changes: 1 addition & 5 deletions packages/e2e-tests/wdio.conf.base.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable no-undef */

import * as dns from 'dns';
import extensionUtils from './src/utils/utils';

export const config: WebdriverIO.Config = {
Expand Down Expand Up @@ -59,8 +58,5 @@ export const config: WebdriverIO.Config = {
tagsInTitle: true,
timeout: 200_000,
retry: 1
} as WebdriverIO.CucumberOpts,
async beforeSession() {
await dns.setDefaultResultOrder('ipv4first');
}
} as WebdriverIO.CucumberOpts
};
6 changes: 6 additions & 0 deletions packages/staking/.storybook/__mocks__/cardano.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Cardano, util } from '@cardano-sdk/core';

export const Wallet = {
util,
Cardano,
};
7 changes: 3 additions & 4 deletions packages/staking/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { StorybookConfig } from '@storybook/react-vite';

import wasm from 'vite-plugin-wasm';
import { dirname, join } from 'path';
import { mergeConfig, UserConfig } from 'vite';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import svgrPlugin from 'vite-plugin-svgr';
import tsconfigPaths from 'vite-tsconfig-paths';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
// TODO to be removed when @lace/icons properly supports ESM
import commonjs from 'vite-plugin-commonjs';

/**
Expand Down Expand Up @@ -44,13 +44,12 @@ const config: StorybookConfig = {
esbuildOptions: { loader: { '.css': 'empty' } },
}),
tsconfigPaths(),
wasm(),
],
resolve: {
alias: [
{
find: /@emurgo\/cardano-message-signing-nodejs/,
replacement: '@emurgo/cardano-message-signing-browser',
find: '@lace/cardano',
replacement: require.resolve('./__mocks__/cardano.ts'),
},
],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import { PieChartGradientColor } from '@lace/ui';
import { PieChartGradientColor } from '@lace/ui';
import type { Meta } from '@storybook/react';
// import { DelegationCard } from './DelegationCard';
import { DelegationCard } from './DelegationCard';

export default {
title: 'DelegationCard',
Expand All @@ -9,20 +9,20 @@ export default {
// TODO https://input-output.atlassian.net/browse/LW-9492
export const Overview = () => (
<>
{/* <DelegationCard*/}
{/* arrangement="horizontal"*/}
{/* balance="10000"*/}
{/* cardanoCoinSymbol="ADA"*/}
{/* distribution={[{ color: PieChartGradientColor.LaceLinearGradient, name: 'A', percentage: 100 }]}*/}
{/* status="simple-delegation"*/}
{/* />*/}
{/* <hr />*/}
{/* <DelegationCard*/}
{/* arrangement="vertical"*/}
{/* balance="10000"*/}
{/* cardanoCoinSymbol="ADA"*/}
{/* distribution={[{ color: PieChartGradientColor.LaceLinearGradient, name: 'A', percentage: 100 }]}*/}
{/* status="multi-delegation"*/}
{/* />*/}
<DelegationCard
arrangement="horizontal"
balance="10000"
cardanoCoinSymbol="ADA"
distribution={[{ color: PieChartGradientColor.LaceLinearGradient, name: 'A', percentage: 100 }]}
status="simple-delegation"
/>
<hr />
<DelegationCard
arrangement="vertical"
balance="10000"
cardanoCoinSymbol="ADA"
distribution={[{ color: PieChartGradientColor.LaceLinearGradient, name: 'A', percentage: 100 }]}
status="multi-delegation"
/>
</>
);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Flex } from '@lace/ui';
import type { Meta } from '@storybook/react';
// import { PoolDetailsCard } from './';
import { PoolDetailsCard } from './';

export default {
title: 'Drawer/PoolDetailsCard',
Expand All @@ -9,27 +9,27 @@ export default {
// TODO https://input-output.atlassian.net/browse/LW-9492
export const Overview = () => (
<Flex gap="$24" flexDirection="column" alignItems="stretch">
{/* <PoolDetailsCard*/}
{/* color="#475"*/}
{/* name="Pool Name"*/}
{/* actualPercentage={25}*/}
{/* onRemove={() => void 0}*/}
{/* stakeValue="10,000.00"*/}
{/* cardanoCoinSymbol="ADA"*/}
{/* savedPercentage={30}*/}
{/* targetPercentage={30}*/}
{/* onPercentageChange={(nextValue) => console.info('changed 1:', nextValue)}*/}
{/* defaultExpand*/}
{/* />*/}
{/* <PoolDetailsCard*/}
{/* color="#475"*/}
{/* name="Pool Name"*/}
{/* actualPercentage={10}*/}
{/* onRemove={() => void 0}*/}
{/* stakeValue="4,000.00"*/}
{/* targetPercentage={10}*/}
{/* cardanoCoinSymbol="ADA"*/}
{/* onPercentageChange={(nextValue) => console.info('changed 2:', nextValue)}*/}
{/* />*/}
<PoolDetailsCard
color="#475"
name="Pool Name"
actualPercentage={25}
onRemove={() => void 0}
stakeValue="10,000.00"
cardanoCoinSymbol="ADA"
savedPercentage={30}
targetPercentage={30}
onPercentageChange={(nextValue) => console.info('changed 1:', nextValue)}
defaultExpand
/>
<PoolDetailsCard
color="#475"
name="Pool Name"
actualPercentage={10}
onRemove={() => void 0}
stakeValue="4,000.00"
targetPercentage={10}
cardanoCoinSymbol="ADA"
onPercentageChange={(nextValue) => console.info('changed 2:', nextValue)}
/>
</Flex>
);

0 comments on commit dc1d8a2

Please sign in to comment.