Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into eduard/update-core
Browse files Browse the repository at this point in the history
  • Loading branch information
m-aboelenein committed Jul 4, 2024
2 parents 7e80f4e + 105745a commit 2a4a5ba
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
43 changes: 43 additions & 0 deletions example/src/components/EtchRunes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const EtchRunes = ({ addresses, network }: Props) => {
const [divisibility, setDivisibility] = useState<string>('');
const [amount, setAmount] = useState<string>('');
const [mintCap, setMintCap] = useState<string>('');
const [delegateInscription, setDelegateInscription] = useState<string>('');
const [inscriptionContentType, setInscriptionContentType] = useState<string>('');
const [inscriptionContent, setInscriptionContent] = useState<string>('');

const ordinalsAddress = useMemo(
() => addresses.find((a) => a.purpose === AddressPurpose.Ordinals)?.address || '',
Expand All @@ -35,6 +38,14 @@ const EtchRunes = ({ addresses, network }: Props) => {
symbol: symbol || undefined,
premine: preMine || undefined,
divisibility: +divisibility || undefined,
delegateInscriptionId: delegateInscription || undefined,
inscriptionDetails:
inscriptionContent && inscriptionContentType
? {
contentBase64: inscriptionContent,
contentType: inscriptionContentType,
}
: undefined,
terms:
amount || mintCap
? {
Expand All @@ -61,6 +72,14 @@ const EtchRunes = ({ addresses, network }: Props) => {
destinationAddress: ordinalsAddress,
symbol: symbol || undefined,
premine: preMine || undefined,
delegateInscriptionId: delegateInscription || undefined,
inscriptionDetails:
inscriptionContent && inscriptionContentType
? {
contentBase64: inscriptionContent,
contentType: inscriptionContentType,
}
: undefined,
terms:
amount || mintCap
? {
Expand Down Expand Up @@ -111,6 +130,30 @@ const EtchRunes = ({ addresses, network }: Props) => {
<h4>Symbol</h4>
<input type="text" value={symbol} onChange={(e) => setSymbol(e.target.value)} />
</div>
<div>
<h4>Delegate inscription</h4>
<input
type="text"
value={delegateInscription}
onChange={(e) => setDelegateInscription(e.target.value)}
/>
</div>
<div>
<h4>Inscription Content</h4>
<input
type="text"
value={inscriptionContent}
onChange={(e) => setInscriptionContent(e.target.value)}
/>
</div>
<div>
<h4>Inscription Content type</h4>
<input
type="text"
value={inscriptionContentType}
onChange={(e) => setInscriptionContentType(e.target.value)}
/>
</div>
<div>
<h4>Divisibility</h4>
<input
Expand Down
4 changes: 2 additions & 2 deletions example/src/components/MintRunes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const MintRunes = ({ addresses, network }: Props) => {
setTotalSize(response.result.totalSize);
} else {
console.error(response.error);
alert('Error Fetching Estimate. See console for details.');
alert(`Error estimating ${runeName} mint. See console for details.`);
}
};

Expand All @@ -56,7 +56,7 @@ const MintRunes = ({ addresses, network }: Props) => {
setFundTxId(response.result.fundTransactionId);
} else {
console.error(response.error);
alert('Error sending BTC. See console for details.');
alert(`Error executing ${runeName} mint. See console for details.`);
}
};

Expand Down

0 comments on commit 2a4a5ba

Please sign in to comment.