Compare commits
10 Commits
hooks-xaha
...
optimize-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
447d42e53a | ||
|
|
6ed0b54fc5 | ||
|
|
b7e1343055 | ||
|
|
a13dbaeb53 | ||
|
|
98a7a1ee72 | ||
|
|
46c0ec9682 | ||
|
|
fbc27b58c3 | ||
|
|
635e1e22aa | ||
|
|
62ca0603fc | ||
|
|
3234ba851a |
@@ -1,8 +1,8 @@
|
|||||||
# XRPL Hooks Builder
|
# Xahau Hooks Builder
|
||||||
|
|
||||||
https://hooks-builder.xrpl.org/
|
https://builder.xahau.network/
|
||||||
|
|
||||||
This is the repository for XRPL Hooks Builder. This project is built with Next.JS
|
This is the repository for Xahau Hooks Builder. This project is built with Next.JS
|
||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ export const AccountDialog = ({
|
|||||||
.toUnit()
|
.toUnit()
|
||||||
.toLocaleString(undefined, {
|
.toLocaleString(undefined, {
|
||||||
style: 'currency',
|
style: 'currency',
|
||||||
currency: 'XRP',
|
currency: 'XAH',
|
||||||
currencyDisplay: 'name'
|
currencyDisplay: 'name'
|
||||||
})}
|
})}
|
||||||
<Button
|
<Button
|
||||||
@@ -459,7 +459,7 @@ const Accounts: FC<AccountProps> = props => {
|
|||||||
.toUnit()
|
.toUnit()
|
||||||
.toLocaleString(undefined, {
|
.toLocaleString(undefined, {
|
||||||
style: 'currency',
|
style: 'currency',
|
||||||
currency: 'XRP',
|
currency: 'XAH',
|
||||||
currencyDisplay: 'name'
|
currencyDisplay: 'name'
|
||||||
})})`
|
})})`
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ const Navigation = () => {
|
|||||||
<Spinner />
|
<Spinner />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Heading css={{ lineHeight: 1 }}>{snap.gistName || 'XRPL Hooks'}</Heading>
|
<Heading css={{ lineHeight: 1 }}>{snap.gistName || 'Xahau Hooks'}</Heading>
|
||||||
<Text css={{ fontSize: '$xs', color: '$mauve10', lineHeight: 1 }}>
|
<Text css={{ fontSize: '$xs', color: '$mauve10', lineHeight: 1 }}>
|
||||||
{snap.files.length > 0 ? 'Gist: ' : 'Builder'}
|
{snap.files.length > 0 ? 'Gist: ' : 'Builder'}
|
||||||
{snap.files.length > 0 && (
|
{snap.files.length > 0 && (
|
||||||
@@ -180,7 +180,7 @@ const Navigation = () => {
|
|||||||
fontWeight: '$bold'
|
fontWeight: '$bold'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Logo width="48px" height="48px" /> XRPL Hooks Builder
|
<Logo width="48px" height="48px" /> Xahau Hooks Builder
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogDescription as="div">
|
<DialogDescription as="div">
|
||||||
<Text
|
<Text
|
||||||
@@ -191,7 +191,7 @@ const Navigation = () => {
|
|||||||
mb: '$7'
|
mb: '$7'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Hooks add smart contract functionality to the XRP Ledger.
|
Hooks add smart contract functionality to the Xahau Network.
|
||||||
</Text>
|
</Text>
|
||||||
<Flex css={{ flexDirection: 'column', gap: '$2', mt: '$2' }}>
|
<Flex css={{ flexDirection: 'column', gap: '$2', mt: '$2' }}>
|
||||||
<Text
|
<Text
|
||||||
@@ -210,9 +210,9 @@ const Navigation = () => {
|
|||||||
as="a"
|
as="a"
|
||||||
rel="noreferrer noopener"
|
rel="noreferrer noopener"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://github.com/XRPL-Labs/xrpld-hooks"
|
href="https://github.com/Xahau"
|
||||||
>
|
>
|
||||||
<ArrowUpRight size="15px" /> Hooks Github
|
<ArrowUpRight size="15px" /> Xahau Github
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
@@ -231,7 +231,7 @@ const Navigation = () => {
|
|||||||
as="a"
|
as="a"
|
||||||
rel="noreferrer noopener"
|
rel="noreferrer noopener"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://xrpl-hooks.readme.io/docs"
|
href="https://docs.xahau.network/readme-1"
|
||||||
>
|
>
|
||||||
<ArrowUpRight size="15px" /> Hooks documentation
|
<ArrowUpRight size="15px" /> Hooks documentation
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export const TxUI: FC<UIProps> = ({
|
|||||||
|
|
||||||
const otherFields = Object.keys(txFields).filter(k => !richFields.includes(k)) as [keyof TxFields]
|
const otherFields = Object.keys(txFields).filter(k => !richFields.includes(k)) as [keyof TxFields]
|
||||||
const amountOptions = [
|
const amountOptions = [
|
||||||
{ label: 'XRP', value: 'xrp' },
|
{ label: 'XAH', value: 'xah' },
|
||||||
{ label: 'Token', value: 'token' }
|
{ label: 'Token', value: 'token' }
|
||||||
] as const
|
] as const
|
||||||
|
|
||||||
@@ -296,7 +296,7 @@ export const TxUI: FC<UIProps> = ({
|
|||||||
value={isXrpAmount ? amountOptions['0'] : amountOptions['1']}
|
value={isXrpAmount ? amountOptions['0'] : amountOptions['1']}
|
||||||
onChange={(e: any) => {
|
onChange={(e: any) => {
|
||||||
const opt = e as typeof amountOptions[number]
|
const opt = e as typeof amountOptions[number]
|
||||||
if (opt.value === 'xrp') {
|
if (opt.value === 'xah') {
|
||||||
setRawField(field, 'amount.xrp', '0')
|
setRawField(field, 'amount.xrp', '0')
|
||||||
} else {
|
} else {
|
||||||
setRawField(field, 'amount.token', defaultTokenAmount)
|
setRawField(field, 'amount.token', defaultTokenAmount)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"uri": "file:///amount-schema.json",
|
"uri": "file:///amount-schema.json",
|
||||||
"title": "Amount",
|
"title": "Amount",
|
||||||
"description": "Specify xrp in drops and tokens as objects.",
|
"description": "Specify XAH in drops and tokens as objects.",
|
||||||
"schema": {
|
"schema": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"currency": {
|
"currency": {
|
||||||
"description": "Arbitrary currency code for the token. Cannot be XRP."
|
"description": "Arbitrary currency code for the token. Cannot be XAH."
|
||||||
},
|
},
|
||||||
"value": {
|
"value": {
|
||||||
"type": ["string", "number"],
|
"type": ["string", "number"],
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
],
|
],
|
||||||
"defaultSnippets": [
|
"defaultSnippets": [
|
||||||
{
|
{
|
||||||
"label": "Xrp",
|
"label": "XAH",
|
||||||
"body": "1000000"
|
"body": "1000000"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,22 +58,22 @@ function MyApp({ Component, pageProps: { session, ...pageProps } }: AppProps) {
|
|||||||
<meta name="format-detection" content="telephone=no" />
|
<meta name="format-detection" content="telephone=no" />
|
||||||
<meta property="og:url" content={`${origin}${router.asPath}`} />
|
<meta property="og:url" content={`${origin}${router.asPath}`} />
|
||||||
|
|
||||||
<title>XRPL Hooks Builder</title>
|
<title>Xahau Hooks Builder</title>
|
||||||
<meta property="og:title" content="XRPL Hooks Builder" />
|
<meta property="og:title" content="Xahau Hooks Builder" />
|
||||||
<meta name="twitter:title" content="XRPL Hooks Builder" />
|
<meta name="twitter:title" content="Xahau Hooks Builder" />
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:site" content="@XRPLF" />
|
<meta name="twitter:site" content="@XRPLF" />
|
||||||
<meta
|
<meta
|
||||||
name="description"
|
name="description"
|
||||||
content="Hooks Builder, add smart contract functionality to the XRP Ledger."
|
content="Hooks Builder, add smart contract functionality to the Xahau Network."
|
||||||
/>
|
/>
|
||||||
<meta
|
<meta
|
||||||
property="og:description"
|
property="og:description"
|
||||||
content="Hooks Builder, add smart contract functionality to the XRP Ledger."
|
content="Hooks Builder, add smart contract functionality to the Xahau Network."
|
||||||
/>
|
/>
|
||||||
<meta
|
<meta
|
||||||
name="twitter:description"
|
name="twitter:description"
|
||||||
content="Hooks Builder, add smart contract functionality to the XRP Ledger."
|
content="Hooks Builder, add smart contract functionality to the Xahau Network."
|
||||||
/>
|
/>
|
||||||
<meta property="og:image" content={`${origin}${shareImg}`} />
|
<meta property="og:image" content={`${origin}${shareImg}`} />
|
||||||
<meta property="og:image:width" content="1200" />
|
<meta property="og:image:width" content="1200" />
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export const addFunds = async (address: string) => {
|
|||||||
if ('error' in json) {
|
if ('error' in json) {
|
||||||
return toast.error(json.error, { id: toastId })
|
return toast.error(json.error, { id: toastId })
|
||||||
} else {
|
} else {
|
||||||
toast.success(`Funds added (${json.xrp} XRP)`, { id: toastId })
|
toast.success(`Funds added (${json.xrp} XAH)`, { id: toastId })
|
||||||
const currAccount = state.accounts.find(acc => acc.address === address)
|
const currAccount = state.accounts.find(acc => acc.address === address)
|
||||||
if (currAccount) {
|
if (currAccount) {
|
||||||
currAccount.xrp = (Number(currAccount.xrp) + json.xrp * 1000000).toString()
|
currAccount.xrp = (Number(currAccount.xrp) + json.xrp * 1000000).toString()
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ export const compileCode = async (activeId: number) => {
|
|||||||
output: 'wasm',
|
output: 'wasm',
|
||||||
compress: true,
|
compress: true,
|
||||||
strip: state.compileOptions.strip,
|
strip: state.compileOptions.strip,
|
||||||
|
optimize: false,
|
||||||
files: [
|
files: [
|
||||||
{
|
{
|
||||||
type: 'c',
|
type: 'c',
|
||||||
|
|||||||
Reference in New Issue
Block a user