Skip to content

Commit

Permalink
chore: add information about dev setup and include link to dev setup …
Browse files Browse the repository at this point in the history
…page in conributing.md documentation
  • Loading branch information
Dayvvo committed Mar 6, 2024
1 parent 399fdda commit 3b82b14
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ npm run dev:start

Enjoy the test drive!

## Dev Setup Page

When running Jam in dev mode, Additional Jam instances are provided by default. These instances can be used to set up different wallets and simulate collaborative transactions between themselves as though between different identities. A block explorer and RPC terminal are also available for directly interacting with the regtest node that Jam uses.

Information on how to access these development features can be found on the _/dev-setup_ route at port 3000

## Reporting Issues

Reporting an issue is as easy as [opening one on GitHub](https://github.com/joinmarket-webui/jam/issues/new).
Expand Down
14 changes: 11 additions & 3 deletions src/components/BitcoinQR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import QRCode from 'qrcode'

import { satsToBtc } from '../utils'
import { AmountSats, BitcoinAddress } from '../libs/JmWalletApi'

interface BitcoinQRProps {
address: BitcoinAddress
amount?: AmountSats
Expand All @@ -23,7 +22,7 @@ export const BitcoinQR = ({ address, amount, errorCorrectionLevel = 'H', width =
errorCorrectionLevel,
width,
})
.then((val) => {
.then(async (val) => {
setImage(val)
setData(uri)
})
Expand All @@ -33,9 +32,18 @@ export const BitcoinQR = ({ address, amount, errorCorrectionLevel = 'H', width =
})
}, [address, amount, errorCorrectionLevel, width])

const handleFile = async () => {
let fileBlob = await fetch(image as string).then((img) => img.blob())
const file = new File([fileBlob], 'btcAddress.png', { type: 'image/png' })
await navigator.share({
text: 'Type sharing',
url: 'http://fileshare.com',
})
}

return (
<div>
<img src={image} alt={data} title={data} />
<img src={image} onClick={handleFile} alt={data} title={data} />
</div>
)
}
2 changes: 1 addition & 1 deletion src/constants/debugFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface DebugFeatures {
}

const devMode = process.env.NODE_ENV === 'development' && process.env.REACT_APP_JAM_DEV_MODE === 'true'

console.log('dev mode', process.env)
const debugFeatures: DebugFeatures = {
allowCreatingExpiredFidelityBond: devMode,
insecureScheduleTesting: devMode,
Expand Down

0 comments on commit 3b82b14

Please sign in to comment.