@nina-protocol/nina-db 0.0.18 → 0.0.20

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.
@@ -51,10 +51,10 @@ export default class Release extends Model {
51
51
  let metadataAccount = (await metaplex.nfts().findAllByMintList({ mints: [releaseAccount.releaseMint] }, { commitment: 'confirmed' }))[0];
52
52
  let json;
53
53
  try {
54
- json = await axios.get(metadataAccount.uri);
54
+ json = (await axios.get(metadataAccount.uri)).data;
55
55
  }
56
56
  catch (error) {
57
- json = await axios.get(metadataAccount.uri.replace('arweave.net', 'ar-io.net'));
57
+ json = (await axios.get(metadataAccount.uri.replace('arweave.net', 'ar-io.net'))).data;
58
58
  }
59
59
  let publisher = await Account.findOrCreate(releaseAccount.authority.toBase58());
60
60
  release = await this.createRelease({
@@ -77,7 +77,6 @@ export default class Release extends Model {
77
77
  });
78
78
  await this.processRevenueShares(releaseAccount, release);
79
79
  tweetNewRelease(metadata);
80
- console.log('Inserted Release: ', publicKey);
81
80
  return release;
82
81
  };
83
82
  static processRevenueShares = async (releaseData, releaseRecord) => {
@@ -31,7 +31,9 @@ class Transaction extends Model {
31
31
  'PostInitViaHubWithReferenceRelease',
32
32
  'SubscriptionSubscribeAccount',
33
33
  'SubscriptionSubscribeHub',
34
- 'Unknown'
34
+ 'ExchangeAccept',
35
+ 'ExchangeInit',
36
+ 'Unknown',
35
37
  ],
36
38
  },
37
39
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nina-protocol/nina-db",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -54,14 +54,13 @@ export default class Release extends Model {
54
54
  provider,
55
55
  )
56
56
  const metaplex = new Metaplex(connection);
57
-
58
57
  const releaseAccount = await program.account.release.fetch(new anchor.web3.PublicKey(publicKey), 'confirmed')
59
58
  let metadataAccount = (await metaplex.nfts().findAllByMintList({mints: [releaseAccount.releaseMint]}, { commitment: 'confirmed' }))[0];
60
59
  let json
61
60
  try {
62
- json = await axios.get(metadataAccount.uri)
61
+ json = (await axios.get(metadataAccount.uri)).data
63
62
  } catch (error) {
64
- json = await axios.get(metadataAccount.uri.replace('arweave.net', 'ar-io.net'))
63
+ json = (await axios.get(metadataAccount.uri.replace('arweave.net', 'ar-io.net'))).data
65
64
  }
66
65
 
67
66
  let publisher = await Account.findOrCreate(releaseAccount.authority.toBase58());
@@ -86,7 +85,6 @@ export default class Release extends Model {
86
85
  })
87
86
  await this.processRevenueShares(releaseAccount, release);
88
87
  tweetNewRelease(metadata);
89
- console.log('Inserted Release: ', publicKey)
90
88
  return release;
91
89
  }
92
90
 
@@ -32,7 +32,9 @@ class Transaction extends Model {
32
32
  'PostInitViaHubWithReferenceRelease',
33
33
  'SubscriptionSubscribeAccount',
34
34
  'SubscriptionSubscribeHub',
35
- 'Unknown'
35
+ 'ExchangeAccept',
36
+ 'ExchangeInit',
37
+ 'Unknown',
36
38
  ],
37
39
  },
38
40
  },