Minor updates #1

Closed
tornadocontrib wants to merge 67 commits from tornadocontrib/tornado-core:main into main
6 changed files with 30 additions and 6 deletions
Showing only changes of commit 82aeabd739 - Show all commits

7
dist/index.js vendored
View File

@ -2611,10 +2611,15 @@ class RelayerClient {
askRelayerStatus(_0) {
return __async$9(this, arguments, function* ({
hostname,
url,
relayerAddress
}) {
var _a, _b;
const url = `https://${!hostname.endsWith("/") ? hostname + "/" : hostname}`;
if (!url) {
url = `https://${!hostname.endsWith("/") ? hostname + "/" : hostname}`;
} else if (!url.endsWith("/")) {
url += "/";
}
const rawStatus = yield fetchData(`${url}status`, __spreadProps$1(__spreadValues$1({}, this.fetchDataOptions), {
headers: {
"Content-Type": "application/json, application/x-www-form-urlencoded"

7
dist/index.mjs vendored
View File

@ -2590,10 +2590,15 @@ class RelayerClient {
askRelayerStatus(_0) {
return __async$9(this, arguments, function* ({
hostname,
url,
relayerAddress
}) {
var _a, _b;
const url = `https://${!hostname.endsWith("/") ? hostname + "/" : hostname}`;
if (!url) {
url = `https://${!hostname.endsWith("/") ? hostname + "/" : hostname}`;
} else if (!url.endsWith("/")) {
url += "/";
}
const rawStatus = yield fetchData(`${url}status`, __spreadProps$1(__spreadValues$1({}, this.fetchDataOptions), {
headers: {
"Content-Type": "application/json, application/x-www-form-urlencoded"

View File

@ -131,8 +131,9 @@ export declare class RelayerClient {
selectedRelayer?: RelayerInfo;
fetchDataOptions?: fetchDataOptions;
constructor({ netId, config, fetchDataOptions }: RelayerClientConstructor);
askRelayerStatus({ hostname, relayerAddress, }: {
askRelayerStatus({ hostname, url, relayerAddress, }: {
hostname: string;
url?: string;
relayerAddress?: string;
}): Promise<RelayerStatus>;
filterRelayer(relayer: CachedRelayerInfo): Promise<RelayerInfo | RelayerError | undefined>;

7
dist/tornado.umd.js vendored
View File

@ -71566,10 +71566,15 @@ class RelayerClient {
askRelayerStatus(_0) {
return __async(this, arguments, function* ({
hostname,
url,
relayerAddress
}) {
var _a, _b;
const url = `https://${!hostname.endsWith("/") ? hostname + "/" : hostname}`;
if (!url) {
url = `https://${!hostname.endsWith("/") ? hostname + "/" : hostname}`;
} else if (!url.endsWith("/")) {
url += "/";
}
const rawStatus = yield (0,_providers__WEBPACK_IMPORTED_MODULE_2__/* .fetchData */ .Fd)(`${url}status`, __spreadProps(__spreadValues({}, this.fetchDataOptions), {
headers: {
"Content-Type": "application/json, application/x-www-form-urlencoded"

File diff suppressed because one or more lines are too long

View File

@ -199,12 +199,20 @@ export class RelayerClient {
async askRelayerStatus({
hostname,
url,
relayerAddress,
}: {
hostname: string;
// optional url if entered manually
url?: string;
// relayerAddress from registry contract to prevent cheating
relayerAddress?: string;
}): Promise<RelayerStatus> {
const url = `https://${!hostname.endsWith('/') ? hostname + '/' : hostname}`;
if (!url) {
url = `https://${!hostname.endsWith('/') ? hostname + '/' : hostname}`;
} else if (!url.endsWith('/')) {
url += '/';
}
const rawStatus = (await fetchData(`${url}status`, {
...this.fetchDataOptions,