diff --git a/frontend/src/app/components/docs/api-docs.component.html b/frontend/src/app/components/docs/api-docs.component.html index c7c2910d7..e19ca2b42 100644 --- a/frontend/src/app/components/docs/api-docs.component.html +++ b/frontend/src/app/components/docs/api-docs.component.html @@ -672,7 +672,7 @@ POST Transaction Transactions
Endpoint
-
POST /api/tx
+
POST {{ baseNetworkUrl }}/api/tx
Description
diff --git a/frontend/src/app/components/docs/code-template.component.ts b/frontend/src/app/components/docs/code-template.component.ts index 6417bae8d..f5e65642b 100644 --- a/frontend/src/app/components/docs/code-template.component.ts +++ b/frontend/src/app/components/docs/code-template.component.ts @@ -303,10 +303,18 @@ yarn add @mempool/liquid.js`; return `curl -X POST -sSLd "${text}"`; } return `curl -sSL "${this.hostname}/${this.network}${text}"`; + } else if (this.env.BASE_MODULE === 'liquid') { + if (this.method === 'post') { + if (this.network !== 'liquid') { + text = text.replace('/api', `/${this.network}/api`); + } + return `curl -X POST -sSLd "${text}"`; + } + return ( this.network === 'liquid' ? `curl -sSL "${this.hostname}${text}"` : `curl -sSL "${this.hostname}/${this.network}${text}"` ); + } else { + return `curl -sSL "${this.hostname}${text}"`; } - if (this.env.BASE_MODULE !== 'mempool') { - return `curl -sSL "${this.hostname}${text}"`; - } + } }