-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from BitCannaGlobal/v1.0.20
Update 1.0.20
- Loading branch information
Showing
9 changed files
with
5,979 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title> | ||
Keplr example | ||
</title> | ||
|
||
|
||
<meta charset="utf-8" /> | ||
<title>Webpack App</title> | ||
</head> | ||
<body> | ||
<div id="app"> | ||
<div class="container-sm"> | ||
<br /> <br /> | ||
<!--<div id="address"></div>--> | ||
<div id="returnResult"></div> | ||
|
||
<form name="sendForm"> | ||
<div class="row"> | ||
<div class="col-sm-6"> | ||
<div class="card"> | ||
<div class="card-body"> | ||
<h5 class="card-title">Your Address</h5> | ||
<p class="card-text"><div id="address"></div></p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-sm-6"> | ||
<div class="card"> | ||
<div class="card-body"> | ||
<h5 class="card-title">Amount: $<span id="getAmount">1.5</span></h5> | ||
<p class="card-text"><div id="finalAmount"></div></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<br /> | ||
|
||
<div class="btn-group-toggle" data-toggle="buttons" id="listChains"> | ||
<!--<label class="btn btn-secondary active"> | ||
<input type="radio" id="atom" value="Cosmoshub" name="get_chain" checked> Atom | ||
</label>--> | ||
<label class="btn btn-secondary active"> | ||
<input type="radio" id="BitCanna" value="BitCanna" name="get_chain" checked> Bitcanna | ||
</label> | ||
<label class="btn btn-secondary active"> | ||
<input type="radio" id="Chihuahua" value="Chihuahua" name="get_chain" checked> Chihuahua | ||
</label> | ||
<label class="btn btn-secondary active"> | ||
<input type="radio" id="Akash" value="Akash" name="get_chain" checked> Akash | ||
</label> | ||
</div> | ||
|
||
<br /> | ||
<!-- <input type="radio" id="atom" value="atom" name="get_chain"> | ||
<label for="atom">Atom</label><br> | ||
<input type="radio" id="bitcanna" value="bitcanna" name="get_chain"> | ||
<label for="bitcanna">Bitcanna</label><br> | ||
<input type="radio" id="chihuahua" value="chihuahua" name="get_chain"> | ||
<label for="chihuahua">Chihuahua</label> | ||
--> | ||
<div class="form-group"> | ||
<label for="recipient">Recipient</label> | ||
<input class="form-control" id="inputAddress" name="recipient"> | ||
</div> | ||
<div class="form-group"> | ||
<label for="amount">Amount</label> | ||
<div class="input-group"> | ||
<input class="form-control" id="inputAmount" name="amount"> | ||
<div class="input-group-append"> | ||
<div class="input-group-text" id="viewDenom">ATOM</div> | ||
</div> | ||
</div> | ||
</div> | ||
<input class="form-control" id="order_id" name="order_id" value="1" type="hidden"> | ||
<input class="form-control" id="memo" name="memo" value="sdfghs" type="hidden"> | ||
<button type="submit" class="btn btn-secondary ">Submit</button> | ||
</form> | ||
</div> | ||
</div> | ||
<h1>Hello world!</h1> | ||
<h2>Tip: Check your console</h2> | ||
</body> | ||
<script> | ||
|
||
console.log(exportCosmosConfig) | ||
|
||
</script> | ||
<script> | ||
if ("serviceWorker" in navigator) { | ||
window.addEventListener("load", () => { | ||
navigator.serviceWorker | ||
.register("service-worker.js") | ||
.then((registration) => { | ||
console.log("Service Worker registered: ", registration); | ||
}) | ||
.catch((registrationError) => { | ||
console.error("Service Worker registration failed: ", registrationError); | ||
}); | ||
}); | ||
} | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
{ | ||
"name": "cosmos-pay-source", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
"main": "index.js", | ||
"name": "cosmos-pay-source", | ||
"scripts": { | ||
"dev": "webpack-dev-server" | ||
"build": "webpack --mode=production --node-env=production", | ||
"build:dev": "webpack --mode=development", | ||
"build:prod": "webpack --mode=production --node-env=production", | ||
"watch": "webpack --watch", | ||
"serve": "webpack serve" | ||
}, | ||
"keywords": [], | ||
"author": "BitCanna", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"html-webpack-plugin": "^4.3.0", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.11.0" | ||
"html-webpack-plugin": "^5.5.3", | ||
"prettier": "^3.1.0", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^4.15.1", | ||
"workbox-webpack-plugin": "^7.0.0" | ||
}, | ||
"dependencies": { | ||
"@chainapsis/cosmosjs": "0.0.3-alpha.3", | ||
"@cosmjs/launchpad": "^0.23.0", | ||
"@cosmjs/proto-signing": "^0.26.5", | ||
"@cosmjs/stargate": "^0.26.5", | ||
"@cosmjs/proto-signing": "^0.31.3", | ||
"@cosmjs/stargate": "^0.31.3", | ||
"axios": "^0.19.0", | ||
"fast-deep-equal": "^3.1.1", | ||
"jquery": "^3.6.0" | ||
"jquery": "^3.7.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,57 @@ | ||
const HtmlWebpackPlugin = require("html-webpack-plugin"); | ||
const path = require("path"); | ||
// Generated using webpack-cli https://github.com/webpack/webpack-cli | ||
const path = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const WorkboxWebpackPlugin = require('workbox-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: { | ||
main: "./src/main.js", | ||
}, | ||
const isProduction = process.env.NODE_ENV == 'production'; | ||
|
||
const config = { | ||
entry: './src/main.js', | ||
output: { | ||
filename: "bundle.js", | ||
path: path.resolve(__dirname, "dist"), | ||
library: 'exportCosmosConfig', | ||
path: path.resolve(__dirname, 'dist'), | ||
library: 'exportCosmosConfig', | ||
libraryExport: "default" , | ||
libraryTarget: 'umd' | ||
}, | ||
devServer: { | ||
port: 8081 | ||
}, | ||
open: true, | ||
host: 'localhost', | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: "index.html", | ||
chunks: ["main"] | ||
}) | ||
template: 'index.html', | ||
}), | ||
], | ||
externals: { | ||
jquery: 'jQuery' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, | ||
type: 'asset', | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
fallback: { | ||
buffer: false, | ||
crypto: false, | ||
events: false, | ||
path: false, | ||
stream: false, | ||
string_decoder: false, | ||
}, | ||
}, | ||
}; | ||
|
||
module.exports = () => { | ||
if (isProduction) { | ||
config.mode = 'production'; | ||
config.plugins.push(new WorkboxWebpackPlugin.GenerateSW()); | ||
} else { | ||
config.mode = 'development'; | ||
} | ||
return config; | ||
}; |