mirror of
https://github.com/fullstack-cash/wallet.fullstack.cash.git
synced 2026-09-21 16:52:05 -07:00
fix(token): Update token creation
This commit is contained in:
+2
-1
@@ -16,7 +16,8 @@ module.exports = {
|
||||
// }
|
||||
// },
|
||||
// require.resolve('/home/trout/work/psf/gatsby-plugin-bch-sweep')
|
||||
'fullstack-gatsby-plugin-bch-sweep'
|
||||
'fullstack-gatsby-plugin-bch-sweep',
|
||||
'fullstack-gatsby-plugin-bch-create-token'
|
||||
// 'gatsby-plugin-bch-create-token'
|
||||
],
|
||||
// https://www.gatsbyjs.com/docs/reference/release-notes/v2.28/#feature-flags-in-gatsby-configjs
|
||||
|
||||
+42
-1
@@ -1,5 +1,6 @@
|
||||
const path = require('path')
|
||||
// const webpack = require('webpack')
|
||||
|
||||
const webpack = require('webpack')
|
||||
exports.onCreateWebpackConfig = ({ stage, actions, getConfig, plugins }) => {
|
||||
// console.log('stage', stage)
|
||||
// console.log('actions', actions)
|
||||
@@ -8,9 +9,49 @@ exports.onCreateWebpackConfig = ({ stage, actions, getConfig, plugins }) => {
|
||||
// https://webpack.js.org/configuration/resolve/
|
||||
actions.setWebpackConfig({
|
||||
resolve: {
|
||||
fallback: {
|
||||
fs: false,
|
||||
path: require.resolve('path-browserify'),
|
||||
crypto: require.resolve('crypto-browserify'),
|
||||
stream: require.resolve('stream-browserify'),
|
||||
buffer: require.resolve('buffer'),
|
||||
http: require.resolve('stream-http'),
|
||||
zlib: require.resolve('browserify-zlib'),
|
||||
https: require.resolve('https-browserify'),
|
||||
process: require.resolve('process/browser'),
|
||||
assert: require.resolve('assert')
|
||||
},
|
||||
alias: {
|
||||
process: 'process/browser',
|
||||
'adminlte-2-react': path.resolve('./node_modules/adminlte-2-react')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Ignore css order
|
||||
if (stage === 'build-javascript' || stage === 'develop') {
|
||||
const config = getConfig()
|
||||
const miniCssExtractPlugin = config.plugins.find(
|
||||
plugin => plugin.constructor.name === 'MiniCssExtractPlugin'
|
||||
)
|
||||
if (miniCssExtractPlugin) {
|
||||
miniCssExtractPlugin.options.ignoreOrder = true
|
||||
}
|
||||
|
||||
// Create new webpack plugins for resolve 'process/browser'
|
||||
// and buffer/Buffer
|
||||
const processPlugin = new webpack.ProvidePlugin({
|
||||
process: 'process/browser'
|
||||
})
|
||||
const bufferPlugin = new webpack.ProvidePlugin({
|
||||
Buffer: ['buffer', 'Buffer']
|
||||
})
|
||||
|
||||
// Add plugins to webpack plugins array
|
||||
config.plugins.push(processPlugin)
|
||||
config.plugins.push(bufferPlugin)
|
||||
|
||||
// Save the new config
|
||||
actions.replaceWebpackConfig(config)
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+484
-37210
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -27,7 +27,9 @@
|
||||
"adminlte-2-react": "0.2.0-beta.10",
|
||||
"fullstack-gatsby-plugin-bch-sweep": "1.0.0",
|
||||
"fullstack-gatsby-theme-bch-wallet": "1.0.4",
|
||||
"gatsby": "4.4.0"
|
||||
"gatsby": "4.4.0",
|
||||
"gatsby-plugin-bch-create-token": "^1.1.2",
|
||||
"fullstack-gatsby-plugin-bch-create-token": "https://github.com/FullStack-cash/fullstack-gatsby-plugin-bch-create-token#dh-update-token"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -16,7 +16,7 @@ import SendReceive from 'fullstack-gatsby-theme-bch-wallet/src/components/admin-
|
||||
|
||||
import About from '../../about'
|
||||
import Sweep from 'fullstack-gatsby-plugin-bch-sweep/src/components/sweep/index'
|
||||
// import CreateToken from 'gatsby-plugin-bch-create-token/src/components/create-token'
|
||||
import CreateToken from 'fullstack-gatsby-plugin-bch-create-token/src/components/create-token'
|
||||
|
||||
const { Item } = Sidebar
|
||||
|
||||
@@ -49,13 +49,13 @@ const MenuComponents = props => {
|
||||
// component: <Wallet key="Wallet" interface="consumer-api" {...props} />,
|
||||
menuItem: <Item icon='fa-wallet' key='Wallet' text='Wallet' />
|
||||
},
|
||||
// {
|
||||
// key: 'Create Token',
|
||||
// component: <CreateToken key='Create Token' {...props} />,
|
||||
// menuItem: (
|
||||
// <Item icon='fas-plus-square' key='Create Token' text='Create Token' />
|
||||
// )
|
||||
// },
|
||||
{
|
||||
key: 'Create Token',
|
||||
component: <CreateToken key='Create Token' {...props} />,
|
||||
menuItem: (
|
||||
<Item icon='fas-plus-square' key='Create Token' text='Create Token' />
|
||||
)
|
||||
},
|
||||
{
|
||||
key: 'Configure',
|
||||
component: <Configure key='Configure' {...props} />,
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ export default function HTML (props) {
|
||||
<script src='https://unpkg.com/minimal-slp-wallet' />
|
||||
|
||||
{/* bch-message-lib */}
|
||||
<script src='https://unpkg.com/bch-message-lib' />
|
||||
{/* <script src='https://unpkg.com/bch-message-lib' /> */}
|
||||
|
||||
{/* bch-token-sweep */}
|
||||
<script src='https://unpkg.com/bch-token-sweep' />
|
||||
|
||||
Reference in New Issue
Block a user