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

@mutants/cardano

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mutants/cardano - npm Package Compare versions

Comparing version 1.8.9 to 1.8.10

10

dist/utils/cbor/multiasset.js

@@ -37,3 +37,9 @@ "use strict";

return Object.keys(unordered)
.sort()
.sort(function (k1, k2) {
if (k1.length > k2.length)
return 1;
else if (k2.length > k1.length)
return -1;
return k1 > k2 ? 1 : -1;
})
.reduce(function (obj, key) {

@@ -49,4 +55,4 @@ obj[key] =

encode: encode,
sort: sort
sort: sort,
};
//# sourceMappingURL=multiasset.js.map

2

package.json
{
"name": "@mutants/cardano",
"version": "1.8.9",
"version": "1.8.10",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -431,2 +431,4 @@ import { CardanoAsset } from "../assets";

});
describe("case 6", () => {});
});

@@ -1115,3 +1117,38 @@

});
test("should correctly sort 4", () => {
const multiasset = {
BB78D3B6638537D6DF7AE43791EAD3D50E75FDAE82131EFF2B7AE994: {
"556E626F756E64656445617274684D696E757331364D696E75733734": 1,
"556E626F756E64656445617274684D696E75733434506C75733636": 1,
"556E626F756E64656445617274684D696E75733934506C75733235": 1,
"556E626F756E64656445617274684D696E757339394D696E7573313136": 1,
"556E626F756E6465644561727468506C7573313133506C75733337": 1,
"556E626F756E6465644561727468506C757333384D696E75733337": 1,
},
D517F38DD2C5ACC3347C8E933E2C0185FAFE3BA838F8830000A3C95F: {
"4D7574616E7443726F633031313030": 1,
"4D7574616E7443726F633038343336": 1,
},
};
const sorted = CborMultiasset.sort(multiasset);
expect(JSON.stringify(sorted)).toBe(
JSON.stringify({
BB78D3B6638537D6DF7AE43791EAD3D50E75FDAE82131EFF2B7AE994: {
"556E626F756E64656445617274684D696E75733434506C75733636": 1,
"556E626F756E64656445617274684D696E75733934506C75733235": 1,
"556E626F756E6465644561727468506C7573313133506C75733337": 1,
"556E626F756E6465644561727468506C757333384D696E75733337": 1,
"556E626F756E64656445617274684D696E757331364D696E75733734": 1,
"556E626F756E64656445617274684D696E757339394D696E7573313136": 1,
},
D517F38DD2C5ACC3347C8E933E2C0185FAFE3BA838F8830000A3C95F: {
"4D7574616E7443726F633031313030": 1,
"4D7574616E7443726F633038343336": 1,
},
})
);
});
});
});

@@ -25,3 +25,5 @@ import { CborByte, CborSet, CborUnsigned } from ".";

const quantity = (sortedMultiasset[policy] as Multiasset)[assetName] as number;
const quantity = (sortedMultiasset[policy] as Multiasset)[
assetName
] as number;
const encodedQuantity = CborUnsigned.encode(quantity);

@@ -46,3 +48,8 @@

return Object.keys(unordered)
.sort()
.sort((k1, k2) => {
if (k1.length > k2.length) return 1;
else if (k2.length > k1.length) return -1;
return k1 > k2 ? 1 : -1;
})
.reduce((obj, key) => {

@@ -59,3 +66,3 @@ obj[key] =

encode,
sort
sort,
};

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