Skip to content

Mempool History Support #966

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
run: npm test
- name: Generates Secrets File
run: |
echo "export default { PROJECT_ID_MAINNET: '${{ secrets.PROJECT_ID_MAINNET }}', PROJECT_ID_PREVIEW: '${{ secrets.PROJECT_ID_PREVIEW }}', PROJECT_ID_PREPROD: '${{ secrets.PROJECT_ID_PREPROD }}'};" > secrets.production.js
echo "export default { PROJECT_ID_MAINNET: '${{ secrets.PROJECT_ID_MAINNET }}', PROJECT_ID_PREVIEW: '${{ secrets.PROJECT_ID_PREVIEW }}', PROJECT_ID_PREPROD: '${{ secrets.PROJECT_ID_PREPROD }}', POSTHOG_API_KEY:'${{ secrets.POSTHOG_API_KEY }}', POSTHOG_PROJECT_ID: '${{ secrets.POSTHOG_PROJECT_ID }}', LACE_EXTENSION_ID: '${{ secrets.LACE_EXTENSION_ID }}'};" > secrets.production.js
- name: Build
run: npm run build
with:
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
- name: Upload build
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ secrets.development.js

# IDEs
.idea

*storybook.log
49 changes: 49 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const path = require('path');
const { NormalModuleReplacementPlugin } = require('webpack');

const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-webpack5-compiler-swc',
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
webpackFinal: webPackconfig => {
const fileLoaderRule = webPackconfig.module.rules.find(rule =>
rule.test?.test('.svg'),
);
fileLoaderRule.exclude = /\.svg$/;
webPackconfig.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: [
{
loader: '@svgr/webpack',
options: {
icon: true,
exportType: 'named',
},
},
],
});
webPackconfig.resolve.extensions.push('.svg');
if (webPackconfig.plugins) {
webPackconfig.plugins.push(
new NormalModuleReplacementPlugin(
/^webextension-polyfill$/,
path.join(__dirname, './mocks/webextension-polyfill.mock.ts'),
),
);
}

return webPackconfig;
},
};
export default config;
2 changes: 2 additions & 0 deletions .storybook/mocks/webextension-polyfill.mock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const runtime = {};
export const storage = {};
37 changes: 37 additions & 0 deletions .storybook/preview.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import { Box, DarkMode, Flex, LightMode } from '@chakra-ui/react';
import Theme from '../src/ui/theme';

const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export const decorators = [
(Story) => {
return (
<Theme>
<Flex>
<LightMode>
<Box p="50px">
<Story />
</Box>
</LightMode>
<DarkMode>
<Box p="50px" backgroundColor="#2E2E2E">
<Story />
</Box>
</DarkMode>
</Flex>
</Theme>
);
},
];

export default preview;
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ cardano.getBalance() : Value

`Value` is a hex encoded cbor string.

##### cardano.getMempoolTxs(paginate)

```
cardano.getMempoolTxs() : [TxHash]
```


##### cardano.getUtxos(amount, paginate)

```
Expand Down
Loading