mirror of
https://github.com/fullstack-cash/fullstack-gatsby-theme-bch-wallet.git
synced 2026-09-21 16:52:06 -07:00
Got token sends working
This commit is contained in:
Generated
+10
-10
@@ -1081,9 +1081,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@chris.troutner/bch-js": {
|
"@chris.troutner/bch-js": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/@chris.troutner/bch-js/-/bch-js-3.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@chris.troutner/bch-js/-/bch-js-3.3.3.tgz",
|
||||||
"integrity": "sha512-MWEWfmymURHShV8gihX/vewjE66g0r3uJw5/ws0e/UBQLxW/G0VKNvkoe0x6aNMv4qnWuEeTlAedxFy4giTf0g==",
|
"integrity": "sha512-P5bSJPglZSigolL2UAmJ+BgFb641SjrlUmBYetDBcunCKSZQHJ1Z5ihKvcJJBNjSBnrOAXRQtKGHTzLHKFaIRw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@uppy/core": "^1.10.4",
|
"@uppy/core": "^1.10.4",
|
||||||
"@uppy/tus": "^1.5.12",
|
"@uppy/tus": "^1.5.12",
|
||||||
@@ -25903,9 +25903,9 @@
|
|||||||
"integrity": "sha1-vLQEXI3QU5wTS8FIjN0+dop6nlE="
|
"integrity": "sha1-vLQEXI3QU5wTS8FIjN0+dop6nlE="
|
||||||
},
|
},
|
||||||
"js-base64": {
|
"js-base64": {
|
||||||
"version": "2.6.2",
|
"version": "2.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.3.tgz",
|
||||||
"integrity": "sha512-1hgLrLIrmCgZG+ID3VoLNLOSwjGnoZa8tyrUdEteMeIzsT6PH7PMLyUvbDwzNE56P3PNxyvuIOx4Uh2E5rzQIw=="
|
"integrity": "sha512-fiUvdfCaAXoQTHdKMgTvg6IkecXDcVz6V5rlftUTclF9IKBjMizvSdQaCl/z/6TApDeby5NL+axYou3i0mu1Pg=="
|
||||||
},
|
},
|
||||||
"js-sha256": {
|
"js-sha256": {
|
||||||
"version": "0.9.0",
|
"version": "0.9.0",
|
||||||
@@ -27184,11 +27184,11 @@
|
|||||||
"integrity": "sha512-zd6KCAyXgmq6FV1mR10oKXYtvmA9vRoB6xPSTUJTbFApCtkefDnYueVR1gkof3KcdLZo1Y8mjF2DFmQMIxsHNQ=="
|
"integrity": "sha512-zd6KCAyXgmq6FV1mR10oKXYtvmA9vRoB6xPSTUJTbFApCtkefDnYueVR1gkof3KcdLZo1Y8mjF2DFmQMIxsHNQ=="
|
||||||
},
|
},
|
||||||
"minimal-slp-wallet": {
|
"minimal-slp-wallet": {
|
||||||
"version": "1.3.4",
|
"version": "1.3.9",
|
||||||
"resolved": "https://registry.npmjs.org/minimal-slp-wallet/-/minimal-slp-wallet-1.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimal-slp-wallet/-/minimal-slp-wallet-1.3.9.tgz",
|
||||||
"integrity": "sha512-nkykRXjNw9+ZEA207X/x8qqWVzdFWXzbpDxAo36dfEFkX06b/93hPsWdS3x7s4C7bawMTkFSd22HPfSk1Pom0w==",
|
"integrity": "sha512-PixaM7h81XBXgzkxfWAg//feaTAa64kKVADw6PNKaKvdd+EUq64UDDAUxXjDLXaTjX6SiQBzzxiZthy/ZZV6cQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@chris.troutner/bch-js": "3.3.0",
|
"@chris.troutner/bch-js": "3.3.3",
|
||||||
"apidoc": "^0.23.0",
|
"apidoc": "^0.23.0",
|
||||||
"bch-donation": "^1.1.0",
|
"bch-donation": "^1.1.0",
|
||||||
"crypto-js": "^4.0.0"
|
"crypto-js": "^4.0.0"
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
"qrcode.react": "^1.0.0",
|
"qrcode.react": "^1.0.0",
|
||||||
"react": "^16.12.0",
|
"react": "^16.12.0",
|
||||||
"react-dom": "^16.12.0",
|
"react-dom": "^16.12.0",
|
||||||
"minimal-slp-wallet": "1.3.4",
|
"minimal-slp-wallet": "1.3.9",
|
||||||
"react-helmet": "^6.0.0",
|
"react-helmet": "^6.0.0",
|
||||||
"react-jdenticon": "0.0.8",
|
"react-jdenticon": "0.0.8",
|
||||||
"react-qr-reader": "^2.2.1",
|
"react-qr-reader": "^2.2.1",
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class SendTokens extends React.Component {
|
|||||||
qty: Math.floor(Number(amountSat))
|
qty: Math.floor(Number(amountSat))
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('receiver', receiver)
|
// console.log('receiver', receiver)
|
||||||
|
|
||||||
if (!bchWalletLib) {
|
if (!bchWalletLib) {
|
||||||
throw new Error('Wallet not found')
|
throw new Error('Wallet not found')
|
||||||
@@ -137,7 +137,7 @@ class SendTokens extends React.Component {
|
|||||||
// Ensure the wallet UTXOs are up-to-date.
|
// Ensure the wallet UTXOs are up-to-date.
|
||||||
const walletAddr = bchWalletLib.walletInfo.address
|
const walletAddr = bchWalletLib.walletInfo.address
|
||||||
const utxoStore = await bchWalletLib.utxos.initUtxoStore(walletAddr)
|
const utxoStore = await bchWalletLib.utxos.initUtxoStore(walletAddr)
|
||||||
console.log(`utxoStore: ${JSON.stringify(utxoStore, null, 2)}`)
|
// console.log(`utxoStore: ${JSON.stringify(utxoStore, null, 2)}`)
|
||||||
|
|
||||||
// For some reason, the utxo categories do not get populated, so we have
|
// For some reason, the utxo categories do not get populated, so we have
|
||||||
// to do it manually.
|
// to do it manually.
|
||||||
@@ -145,8 +145,8 @@ class SendTokens extends React.Component {
|
|||||||
bchWalletLib.utxos.tokenUtxos = await bchWalletLib.utxos.getTokenUtxos()
|
bchWalletLib.utxos.tokenUtxos = await bchWalletLib.utxos.getTokenUtxos()
|
||||||
|
|
||||||
// Send token.
|
// Send token.
|
||||||
const result = await bchWalletLib.sendTokens(receiver)
|
const result = await bchWalletLib.sendTokens(receiver, 5.0)
|
||||||
console.log('result: ', result)
|
// console.log('result: ', result)
|
||||||
|
|
||||||
_this.setState({
|
_this.setState({
|
||||||
txId: result
|
txId: result
|
||||||
|
|||||||
Reference in New Issue
Block a user