@eluvio/elv-client-js 4.0.64 → 4.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -88,10 +88,16 @@ const FormatNFTDetails = function(entry) {
|
|
|
88
88
|
details.Offers = info.offers || [];
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
const result = {
|
|
92
92
|
metadata,
|
|
93
93
|
details
|
|
94
94
|
};
|
|
95
|
+
|
|
96
|
+
if(entry.nft_template) {
|
|
97
|
+
result.nft_template = entry.nft_template;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return result;
|
|
95
101
|
};
|
|
96
102
|
|
|
97
103
|
exports.FormatNFTDetails = FormatNFTDetails;
|
|
@@ -1244,6 +1244,7 @@ class ElvWalletClient {
|
|
|
1244
1244
|
})
|
|
1245
1245
|
) || [];
|
|
1246
1246
|
|
|
1247
|
+
const modesToFormat = ["owned", "listings", "owned-full-meta"];
|
|
1247
1248
|
return {
|
|
1248
1249
|
paging: {
|
|
1249
1250
|
start: params.start,
|
|
@@ -1251,7 +1252,7 @@ class ElvWalletClient {
|
|
|
1251
1252
|
total: paging.total,
|
|
1252
1253
|
more: paging.total > start + limit
|
|
1253
1254
|
},
|
|
1254
|
-
results: (contents || []).map(item =>
|
|
1255
|
+
results: (contents || []).map(item => modesToFormat.includes(mode) ? FormatNFT(this, item) : item)
|
|
1255
1256
|
};
|
|
1256
1257
|
} catch(error) {
|
|
1257
1258
|
if(error.status && error.status.toString() === "404") {
|