Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serum-vial

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serum-vial - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

38

dist/minion.js

@@ -62,20 +62,22 @@ "use strict";

if (this._cachedListMarketsResponse === undefined) {
const markets = await Promise.all(this._markets.map(async (market) => {
const connection = new web3_js_1.Connection(this._nodeEndpoint);
const { tickSize, minOrderSize, baseMintAddress, quoteMintAddress, programId } = await serum_1.Market.load(connection, new web3_js_1.PublicKey(market.address), undefined, new web3_js_1.PublicKey(market.programId));
const [baseCurrency, quoteCurrency] = market.name.split('/');
const serumMarket = {
name: market.name,
baseCurrency: baseCurrency,
quoteCurrency: quoteCurrency,
version: serum_1.getLayoutVersion(programId),
address: market.address,
programId: market.programId,
baseMintAddress: baseMintAddress.toBase58(),
quoteMintAddress: quoteMintAddress.toBase58(),
tickSize,
minOrderSize,
deprecated: market.deprecated
};
return serumMarket;
const markets = await Promise.all(this._markets.map((market) => {
return helpers_1.executeAndRetry(async () => {
const connection = new web3_js_1.Connection(this._nodeEndpoint);
const { tickSize, minOrderSize, baseMintAddress, quoteMintAddress, programId } = await serum_1.Market.load(connection, new web3_js_1.PublicKey(market.address), undefined, new web3_js_1.PublicKey(market.programId));
const [baseCurrency, quoteCurrency] = market.name.split('/');
const serumMarket = {
name: market.name,
baseCurrency: baseCurrency,
quoteCurrency: quoteCurrency,
version: serum_1.getLayoutVersion(programId),
address: market.address,
programId: market.programId,
baseMintAddress: baseMintAddress.toBase58(),
quoteMintAddress: quoteMintAddress.toBase58(),
tickSize,
minOrderSize,
deprecated: market.deprecated
};
return serumMarket;
}, { maxRetries: 4 });
}));

@@ -82,0 +84,0 @@ this._cachedListMarketsResponse = JSON.stringify(markets, null, 2);

{
"name": "serum-vial",
"version": "1.0.3",
"version": "1.0.4",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=15"

@@ -8,2 +8,3 @@ import { getLayoutVersion, Market } from '@project-serum/serum'

cleanupChannel,
executeAndRetry,
getAllowedValuesText,

@@ -136,26 +137,31 @@ getDidYouMean,

const markets = await Promise.all(
this._markets.map(async (market) => {
const connection = new Connection(this._nodeEndpoint)
const { tickSize, minOrderSize, baseMintAddress, quoteMintAddress, programId } = await Market.load(
connection,
new PublicKey(market.address),
undefined,
new PublicKey(market.programId)
this._markets.map((market) => {
return executeAndRetry(
async () => {
const connection = new Connection(this._nodeEndpoint)
const { tickSize, minOrderSize, baseMintAddress, quoteMintAddress, programId } = await Market.load(
connection,
new PublicKey(market.address),
undefined,
new PublicKey(market.programId)
)
const [baseCurrency, quoteCurrency] = market.name.split('/')
const serumMarket: SerumListMarketItem = {
name: market.name,
baseCurrency: baseCurrency!,
quoteCurrency: quoteCurrency!,
version: getLayoutVersion(programId),
address: market.address,
programId: market.programId,
baseMintAddress: baseMintAddress.toBase58(),
quoteMintAddress: quoteMintAddress.toBase58(),
tickSize,
minOrderSize,
deprecated: market.deprecated
}
return serumMarket
},
{ maxRetries: 4 }
)
const [baseCurrency, quoteCurrency] = market.name.split('/')
const serumMarket: SerumListMarketItem = {
name: market.name,
baseCurrency: baseCurrency!,
quoteCurrency: quoteCurrency!,
version: getLayoutVersion(programId),
address: market.address,
programId: market.programId,
baseMintAddress: baseMintAddress.toBase58(),
quoteMintAddress: quoteMintAddress.toBase58(),
tickSize,
minOrderSize,
deprecated: market.deprecated
}
return serumMarket
})

@@ -162,0 +168,0 @@ )

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