New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

xrpl

Package Overview
Dependencies
Maintainers
8
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xrpl - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

3

dist/npm/Wallet/fundWallet.d.ts

@@ -5,3 +5,4 @@ import type { Client } from '..';

Testnet = "faucet.altnet.rippletest.net",
Devnet = "faucet.devnet.rippletest.net"
Devnet = "faucet.devnet.rippletest.net",
NFTDevnet = "faucet-nft.ripple.com"
}

@@ -8,0 +9,0 @@ declare function fundWallet(this: Client, wallet?: Wallet | null, options?: {

@@ -24,2 +24,3 @@ "use strict";

FaucetNetwork["Devnet"] = "faucet.devnet.rippletest.net";
FaucetNetwork["NFTDevnet"] = "faucet-nft.ripple.com";
})(FaucetNetwork || (FaucetNetwork = {}));

@@ -166,2 +167,5 @@ const INTERVAL_SECONDS = 1;

}
if (connectionUrl.includes('xls20-sandbox')) {
return FaucetNetwork.NFTDevnet;
}
throw new errors_1.XRPLFaucetError('Faucet URL is not defined or inferrable.');

@@ -168,0 +172,0 @@ }

@@ -15,2 +15,3 @@ "use strict";

const errors_1 = require("../errors");
const common_1 = require("../models/transactions/common");
const utils_1 = require("../models/utils");

@@ -178,2 +179,23 @@ const utils_2 = require("../sugar/utils");

}
Object.keys(txCopy).forEach((key) => {
const standard_currency_code_len = 3;
if (txCopy[key] && (0, common_1.isIssuedCurrency)(txCopy[key])) {
const decodedAmount = decoded[key];
const decodedCurrency = decodedAmount.currency;
const txCurrency = txCopy[key].currency;
if (txCurrency.length === standard_currency_code_len &&
txCurrency.toUpperCase() === 'XRP') {
throw new errors_1.XrplError(`Trying to sign an issued currency with a similar standard code to XRP (received '${txCurrency}'). XRP is not an issued currency.`);
}
const amount = txCopy[key];
if (amount.currency.length !== decodedCurrency.length) {
if (decodedCurrency.length === standard_currency_code_len) {
decodedAmount.currency = isoToHex(decodedCurrency);
}
else {
txCopy[key].currency = isoToHex(txCopy[key].currency);
}
}
}
});
if (!lodash_1.default.isEqual(decoded, txCopy)) {

@@ -208,3 +230,11 @@ const data = {

}
function isoToHex(iso) {
const bytes = Buffer.alloc(20);
if (iso !== 'XRP') {
const isoBytes = iso.split('').map((chr) => chr.charCodeAt(0));
bytes.set(isoBytes, 12);
}
return bytes.toString('hex').toUpperCase();
}
exports.default = Wallet;
//# sourceMappingURL=index.js.map
{
"name": "xrpl",
"version": "2.3.0",
"version": "2.3.1",
"license": "ISC",

@@ -30,3 +30,3 @@ "description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",

"ripple-address-codec": "^4.2.4",
"ripple-binary-codec": "^1.4.1",
"ripple-binary-codec": "^1.4.2",
"ripple-keypairs": "^1.1.4",

@@ -72,3 +72,3 @@ "ws": "^8.2.2"

},
"gitHead": "4fddd8f41d4caa1b8bc728705f232e9b211eabde"
"gitHead": "aff6988f098ecc033a0cfa7974101f91de5cf948"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc