Skip to content

Commit

Permalink
Replace request and xhr with axios
Browse files Browse the repository at this point in the history
  • Loading branch information
mainnet-pat committed Aug 19, 2024
1 parent 536ee4a commit a083e9f
Show file tree
Hide file tree
Showing 20 changed files with 297 additions and 1,148 deletions.
2 changes: 1 addition & 1 deletion dist/dist/monero_wallet_full.js

Large diffs are not rendered by default.

Binary file modified dist/dist/monero_wallet_full.wasm
Binary file not shown.
Binary file modified dist/dist/monero_wallet_keys.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/dist/monero_web_worker.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/monero_wallet_full.js

Large diffs are not rendered by default.

Binary file modified dist/monero_wallet_full.wasm
Binary file not shown.
Binary file modified dist/monero_wallet_keys.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/monero_web_worker.js

Large diffs are not rendered by default.

119 changes: 0 additions & 119 deletions dist/monero_web_worker.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,106 +1,3 @@
/* @preserve
* The MIT License (MIT)
*
* Copyright (c) 2013-2018 Petka Antonov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/

/*!
* Copyright 2010 LearnBoost <dev@learnboost.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*!
* Copyright (c) 2015, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

/*!
* Copyright (c) 2018, Salesforce.com, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Salesforce.com nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

/*!
* The buffer module from node.js, for the browser.
*
Expand All @@ -115,28 +12,12 @@
* @license MIT
*/

/*!
* mime-db
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015-2022 Douglas Christopher Wilson
* MIT Licensed
*/

/*!
* mime-types
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/

/*! https://mths.be/punycode v1.4.1 by @mathias */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */

/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */

/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
Expand Down
2 changes: 1 addition & 1 deletion dist/monero_web_worker.js.map

Large diffs are not rendered by default.

14 changes: 2 additions & 12 deletions dist/src/main/ts/common/HttpClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default class HttpClient {
static MAX_REQUESTS_PER_SECOND: number;
protected static DEFAULT_REQUEST: {
method: string;
requestApi: string;
resolveWithFullResponse: boolean;
rejectUnauthorized: boolean;
};
Expand All @@ -25,7 +24,6 @@ export default class HttpClient {
* @param {string} [request.username] - username to authenticate the request (optional)
* @param {string} [request.password] - password to authenticate the request (optional)
* @param {object} [request.headers] - headers to add to the request (optional)
* @param {string} [request.requestApi] - one of "fetch" or "xhr" (default "fetch")
* @param {boolean} [request.resolveWithFullResponse] - return full response if true, else body only (default false)
* @param {boolean} [request.rejectUnauthorized] - whether or not to reject self-signed certificates (default true)
* @param {number} request.timeout - maximum time allowed in milliseconds
Expand All @@ -37,8 +35,6 @@ export default class HttpClient {
* @return {object} response.headers - the response headers
*/
static request(request: any): Promise<any>;
protected static requestFetch(req: any): Promise<any>;
protected static requestXhr(req: any): Promise<any>;
/**
* Get a singleton instance of an HTTP client to share.
*
Expand All @@ -52,12 +48,6 @@ export default class HttpClient {
*/
protected static getHttpsAgent(): any;
protected static parseXhrResponseHeaders(headersStr: any): {};
/**
* Modification of digest auth request by @inorganik.
*
* Dependent on CryptoJS MD5 hashing: http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js
*
* MIT licensed.
*/
protected static digestAuthRequest: (method: any, url: any, username: any, password: any) => void;
protected static requestAxios(req: any): Promise<any>;
protected static axiosDigestAuthRequest: (method: any, url: any, username: any, password: any, body: any) => Promise<import("axios").AxiosResponse<any, any>>;
}
Loading

0 comments on commit a083e9f

Please sign in to comment.