Socket
Socket
Sign inDemoInstall

@galoymoney/client

Package Overview
Dependencies
139
Maintainers
5
Versions
109
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.58 to 0.1.59

17

dist/parsing-v2/index.js

@@ -260,3 +260,3 @@ "use strict";

var getOnChainPayResponse = function (_a) {
var _b;
var _b, _c, _d;
var destinationWithoutProtocol = _a.destinationWithoutProtocol, network = _a.network;

@@ -271,5 +271,8 @@ var paymentType = PaymentType.Onchain;

}
var label = (_b = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _b === void 0 ? void 0 : _b.label;
var message = (_c = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _c === void 0 ? void 0 : _c.message;
var memo = label || message || undefined;
var amount = undefined;
try {
amount = ((_b = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _b === void 0 ? void 0 : _b.amount)
amount = ((_d = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _d === void 0 ? void 0 : _d.amount)
? parseAmount(decodedData.query.amount)

@@ -286,4 +289,9 @@ : undefined;

}
// will throw if address is not valid
bitcoinjs_lib_1.address.toOutputScript(path, parseBitcoinJsNetwork(network));
// FIXME "toOutputScript" will throw if address is not valid, however bitcoinjs-lib does not currently support
// taproot addresses so we must bypass this check if the address uese taproot
var isTaprootAddress = path.toLowerCase().startsWith("bc1p");
if (!isTaprootAddress) {
// will throw if address is not valid
bitcoinjs_lib_1.address.toOutputScript(path, parseBitcoinJsNetwork(network));
}
return {

@@ -294,2 +302,3 @@ valid: true,

amount: amount,
memo: memo,
};

@@ -296,0 +305,0 @@ }

@@ -194,3 +194,3 @@ "use strict";

var getOnChainPayResponse = function (_a) {
var _b;
var _b, _c, _d;
var destinationText = _a.destinationText, network = _a.network;

@@ -204,5 +204,8 @@ try {

}
var label = (_b = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _b === void 0 ? void 0 : _b.label;
var message = (_c = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _c === void 0 ? void 0 : _c.message;
var memo = label || message || undefined;
var amount = undefined;
try {
amount = ((_b = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _b === void 0 ? void 0 : _b.amount)
amount = ((_d = decodedData === null || decodedData === void 0 ? void 0 : decodedData.query) === null || _d === void 0 ? void 0 : _d.amount)
? parseAmount(decodedData.query.amount)

@@ -217,6 +220,11 @@ : undefined;

errorMessage: "Invalid amount in payment destination",
memo: memo,
};
}
// will throw if address is not valid
bitcoinjs_lib_1.address.toOutputScript(path, parseBitcoinJsNetwork(network));
var isTaprootAddress = path.toLowerCase().startsWith("bc1p");
// FIXME "toOutputScript" will throw if address is not valid, however bitcoinjs-lib does not currently support
// taproot addresses so we must bypass this check if the address uese taproot
if (!isTaprootAddress) {
bitcoinjs_lib_1.address.toOutputScript(path, parseBitcoinJsNetwork(network));
}
return {

@@ -227,2 +235,3 @@ valid: true,

amount: amount,
memo: memo,
};

@@ -229,0 +238,0 @@ }

{
"name": "@galoymoney/client",
"main": "dist/index.js",
"version": "0.1.58",
"version": "0.1.59",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": "https://github.com/galoymoney/galoy-client",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc