@mysten/deepbook-v3
Advanced tools
Comparing version 0.4.1 to 0.4.2
# @mysten/deepbook-v3 | ||
## 0.4.2 | ||
### Patch Changes | ||
- 339b8eb: Try catch for getOrder function | ||
## 0.4.1 | ||
@@ -4,0 +10,0 @@ |
@@ -126,3 +126,3 @@ import type { SuiClient } from '@mysten/sui/client'; | ||
expire_timestamp: string; | ||
}>; | ||
} | null>; | ||
/** | ||
@@ -129,0 +129,0 @@ * @description Get level 2 order book specifying range of price |
@@ -251,4 +251,8 @@ "use strict"; | ||
}); | ||
const orderInformation = res.results[0].returnValues[0][0]; | ||
return Order.parse(new Uint8Array(orderInformation)); | ||
try { | ||
const orderInformation = res.results[0].returnValues[0][0]; | ||
return Order.parse(new Uint8Array(orderInformation)); | ||
} catch (e) { | ||
return null; | ||
} | ||
} | ||
@@ -255,0 +259,0 @@ /** |
@@ -126,3 +126,3 @@ import type { SuiClient } from '@mysten/sui/client'; | ||
expire_timestamp: string; | ||
}>; | ||
} | null>; | ||
/** | ||
@@ -129,0 +129,0 @@ * @description Get level 2 order book specifying range of price |
@@ -228,4 +228,8 @@ var __typeError = (msg) => { | ||
}); | ||
const orderInformation = res.results[0].returnValues[0][0]; | ||
return Order.parse(new Uint8Array(orderInformation)); | ||
try { | ||
const orderInformation = res.results[0].returnValues[0][0]; | ||
return Order.parse(new Uint8Array(orderInformation)); | ||
} catch (e) { | ||
return null; | ||
} | ||
} | ||
@@ -232,0 +236,0 @@ /** |
@@ -5,3 +5,3 @@ { | ||
"description": "Sui Deepbook SDK", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"license": "Apache-2.0", | ||
@@ -8,0 +8,0 @@ "type": "commonjs", |
@@ -273,4 +273,8 @@ // Copyright (c) Mysten Labs, Inc. | ||
const orderInformation = res.results![0].returnValues![0][0]; | ||
return Order.parse(new Uint8Array(orderInformation)); | ||
try { | ||
const orderInformation = res.results![0].returnValues![0][0]; | ||
return Order.parse(new Uint8Array(orderInformation)); | ||
} catch (e) { | ||
return null; | ||
} | ||
} | ||
@@ -277,0 +281,0 @@ |
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
697529
7319