@haven-fi/solauto-sdk 1.0.254 → 1.0.255
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"referralStateManager.d.ts","sourceRoot":"","sources":["../../src/clients/referralStateManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAEL,MAAM,EAEN,kBAAkB,EAClB,GAAG,EACJ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,aAAa,EAEd,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,aAAa,EAGd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,mBAAmB,CAAC,EAAE,SAAS,CAAC;CACjC;AAED,qBAAa,oBAAqB,SAAQ,SAAS;IAC1C,GAAG,EAAG,GAAG,CAAC;IACV,MAAM,EAAG,MAAM,CAAC;IAEhB,aAAa,EAAG,SAAS,CAAC;IAC1B,iBAAiB,EAAG,aAAa,GAAG,IAAI,CAAC;IACzC,SAAS,EAAG,SAAS,CAAC;IAEtB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;IAE7B,UAAU,CAAC,IAAI,EAAE,wBAAwB;IA6B/C,mBAAmB,IAAI,MAAM,EAAE;IAS/B,aAAa,CAAC,UAAU,CAAC,EAAE,SAAS;
|
1
|
+
{"version":3,"file":"referralStateManager.d.ts","sourceRoot":"","sources":["../../src/clients/referralStateManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAEL,MAAM,EAEN,kBAAkB,EAClB,GAAG,EACJ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,aAAa,EAEd,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,aAAa,EAGd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,mBAAmB,CAAC,EAAE,SAAS,CAAC;CACjC;AAED,qBAAa,oBAAqB,SAAQ,SAAS;IAC1C,GAAG,EAAG,GAAG,CAAC;IACV,MAAM,EAAG,MAAM,CAAC;IAEhB,aAAa,EAAG,SAAS,CAAC;IAC1B,iBAAiB,EAAG,aAAa,GAAG,IAAI,CAAC;IACzC,SAAS,EAAG,SAAS,CAAC;IAEtB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;IAE7B,UAAU,CAAC,IAAI,EAAE,wBAAwB;IA6B/C,mBAAmB,IAAI,MAAM,EAAE;IAS/B,aAAa,CAAC,UAAU,CAAC,EAAE,SAAS;IAsBpC,sBAAsB,CACpB,YAAY,CAAC,EAAE,SAAS,EACxB,WAAW,CAAC,EAAE,SAAS,GACtB,kBAAkB;IAerB,mBAAmB,IAAI,kBAAkB;IA0BnC,kBAAkB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAC3D"}
|
@@ -45,7 +45,8 @@ class ReferralStateManager extends txHandler_1.TxHandler {
|
|
45
45
|
this.referredBy = finalReferredBy;
|
46
46
|
this.referredByState = finalReferredBy
|
47
47
|
? (0, utils_1.getReferralState)(finalReferredBy, this.programId)
|
48
|
-
: this.referralStateData
|
48
|
+
: this.referralStateData &&
|
49
|
+
!(0, umi_web3js_adapters_1.toWeb3JsPublicKey)(this.referralStateData.referredByState).equals(web3_js_1.PublicKey.default)
|
49
50
|
? (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(this.referralStateData.referredByState)
|
50
51
|
: undefined;
|
51
52
|
}
|
@@ -260,7 +260,7 @@ class TransactionsManager {
|
|
260
260
|
}, 0);
|
261
261
|
isolatedLutTx = Boolean(newAccountsUsage);
|
262
262
|
}
|
263
|
-
|
263
|
+
this.txHandler.log(updateLookupTable?.accountsToAdd.map(x => x.toString()));
|
264
264
|
if (updateLookupTable && isolatedLutTx) {
|
265
265
|
await this.updateLut(updateLookupTable.tx, updateLookupTable.new);
|
266
266
|
}
|
package/package.json
CHANGED
@@ -93,7 +93,10 @@ export class ReferralStateManager extends TxHandler {
|
|
93
93
|
this.referredBy = finalReferredBy;
|
94
94
|
this.referredByState = finalReferredBy
|
95
95
|
? getReferralState(finalReferredBy, this.programId)
|
96
|
-
: this.referralStateData
|
96
|
+
: this.referralStateData &&
|
97
|
+
!toWeb3JsPublicKey(this.referralStateData.referredByState).equals(
|
98
|
+
PublicKey.default
|
99
|
+
)
|
97
100
|
? toWeb3JsPublicKey(this.referralStateData.referredByState)
|
98
101
|
: undefined;
|
99
102
|
}
|
@@ -126,12 +129,7 @@ export class ReferralStateManager extends TxHandler {
|
|
126
129
|
);
|
127
130
|
const feesDestinationTa =
|
128
131
|
referralFeesDestMint !== NATIVE_MINT
|
129
|
-
? publicKey(
|
130
|
-
getTokenAccount(
|
131
|
-
this.authority,
|
132
|
-
referralFeesDestMint
|
133
|
-
)
|
134
|
-
)
|
132
|
+
? publicKey(getTokenAccount(this.authority, referralFeesDestMint))
|
135
133
|
: undefined;
|
136
134
|
|
137
135
|
return claimReferralFees(this.umi, {
|
@@ -383,7 +383,7 @@ export class TransactionsManager {
|
|
383
383
|
}, 0);
|
384
384
|
isolatedLutTx = Boolean(newAccountsUsage);
|
385
385
|
}
|
386
|
-
|
386
|
+
this.txHandler.log(updateLookupTable?.accountsToAdd.map(x => x.toString()));
|
387
387
|
if (updateLookupTable && isolatedLutTx) {
|
388
388
|
await this.updateLut(updateLookupTable.tx, updateLookupTable.new);
|
389
389
|
}
|