@nina-protocol/nina-db 0.0.107 → 0.0.108

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.
@@ -54,7 +54,7 @@ export default class Release extends Model {
54
54
  archived: { type: 'boolean' },
55
55
  },
56
56
  };
57
- static findOrCreate = async (publicKey, hubPublicKey = null, programId = process.env.NINA_PROGRAM_V2_ID) => {
57
+ static findOrCreate = async (publicKey, hubPublicKey = null, programId = process.env.NINA_PROGRAM_V2_ID, isLazy = false) => {
58
58
  try {
59
59
  console.log('Release.findOrCreate', publicKey, programId);
60
60
  let release = await Release.query().findOne({ publicKey });
@@ -114,6 +114,7 @@ export default class Release extends Model {
114
114
  publisherId: publisher.id,
115
115
  releaseAccount,
116
116
  programId,
117
+ solanaAddress: isLazy ? null : publicKey,
117
118
  });
118
119
  if (hubPublicKey) {
119
120
  const hub = await Hub.query().findOne({ publicKey: hubPublicKey });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nina-protocol/nina-db",
3
- "version": "0.0.107",
3
+ "version": "0.0.108",
4
4
  "description": "",
5
5
  "source": "src/index.js",
6
6
  "main": "dist/index.js",
@@ -58,7 +58,7 @@ export default class Release extends Model {
58
58
  },
59
59
  }
60
60
 
61
- static findOrCreate = async (publicKey, hubPublicKey=null, programId=process.env.NINA_PROGRAM_V2_ID) => {
61
+ static findOrCreate = async (publicKey, hubPublicKey=null, programId=process.env.NINA_PROGRAM_V2_ID, isLazy=false) => {
62
62
  try {
63
63
  console.log('Release.findOrCreate', publicKey, programId)
64
64
  let release = await Release.query().findOne({ publicKey });
@@ -140,6 +140,7 @@ export default class Release extends Model {
140
140
  publisherId: publisher.id,
141
141
  releaseAccount,
142
142
  programId,
143
+ solanaAddress: isLazy ? null : publicKey,
143
144
  });
144
145
 
145
146
  if (hubPublicKey) {