@pioneer-platform/pioneer-sdk 8.1.44 → 8.1.45

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.
Files changed (2) hide show
  1. package/lib/index.js +19 -19
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -81,7 +81,7 @@ var SDK = /** @class */ (function () {
81
81
  this.nfts = [];
82
82
  this.init = function (blockchains) {
83
83
  return __awaiter(this, void 0, void 0, function () {
84
- var tag, i, blockchain, _a, userInfo, e_1;
84
+ var tag, i, blockchain, _a, userInfo, i, walletInfo, j, pubkey, k, balance, e_1;
85
85
  return __generator(this, function (_b) {
86
86
  switch (_b.label) {
87
87
  case 0:
@@ -121,23 +121,23 @@ var SDK = /** @class */ (function () {
121
121
  userInfo = userInfo.data;
122
122
  log.info(tag, "userInfo: ", userInfo);
123
123
  //for each wallet
124
- //if(userInfo.walletDescriptions){
125
- // for(let i = 0; userInfo.walletDescriptions.length; i++){
126
- // let walletInfo = userInfo.walletDescriptions[i]
127
- // for(let j =0; j < walletInfo.pubkeys.length; j++){
128
- // let pubkey = walletInfo.pubkeys[j]
129
- // pubkey.context = walletInfo.context
130
- // this.pubkeys.push(pubkey)
131
- // for(let k = 0; k < pubkey.balances.length; k++){
132
- // let balance:any = pubkey.balances[k]
133
- // //add wallet context
134
- // balance.context = walletInfo.context
135
- // balance.pubkey = pubkey.pubkey
136
- // this.balances.push(balance)
137
- // }
138
- // }
139
- // }
140
- // }
124
+ if (userInfo.walletDescriptions) {
125
+ for (i = 0; userInfo.walletDescriptions.length; i++) {
126
+ walletInfo = userInfo.walletDescriptions[i];
127
+ for (j = 0; j < walletInfo.pubkeys.length; j++) {
128
+ pubkey = walletInfo.pubkeys[j];
129
+ pubkey.context = walletInfo.context;
130
+ this.pubkeys.push(pubkey);
131
+ for (k = 0; k < pubkey.balances.length; k++) {
132
+ balance = pubkey.balances[k];
133
+ //add wallet context
134
+ balance.context = walletInfo.context;
135
+ balance.pubkey = pubkey.pubkey;
136
+ this.balances.push(balance);
137
+ }
138
+ }
139
+ }
140
+ }
141
141
  if (!this.username)
142
142
  this.username = userInfo.username;
143
143
  this.wallets = userInfo.wallets;
@@ -612,7 +612,7 @@ var SDK = /** @class */ (function () {
612
612
  case 4:
613
613
  result = _a.sent();
614
614
  result = result.data;
615
- log.debug(tag, "result: ", result);
615
+ log.info(tag, "result: ", result);
616
616
  if (result.wallets) {
617
617
  this.contexts = result.wallets;
618
618
  log.debug(tag, "result: ", result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-sdk",
3
- "version": "8.1.44",
3
+ "version": "8.1.45",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {