@haven-fi/solauto-sdk 1.0.210 → 1.0.212
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/clients/referralStateManager.d.ts +0 -1
- package/dist/clients/referralStateManager.d.ts.map +1 -1
- package/dist/clients/referralStateManager.js +3 -2
- package/dist/clients/txHandler.d.ts +1 -0
- package/dist/clients/txHandler.d.ts.map +1 -1
- package/dist/transactions/transactionUtils.js +1 -1
- package/package.json +1 -1
- package/src/clients/referralStateManager.ts +5 -3
- package/src/clients/txHandler.ts +2 -0
- package/src/transactions/transactionUtils.ts +1 -1
@@ -16,7 +16,6 @@ export declare class ReferralStateManager extends TxHandler {
|
|
16
16
|
referralAuthority: PublicKey;
|
17
17
|
referralState: PublicKey;
|
18
18
|
referralStateData: ReferralState | null;
|
19
|
-
referredByAuthority?: PublicKey;
|
20
19
|
referredByState?: PublicKey;
|
21
20
|
constructor(heliusApiUrl: string, localTest?: boolean | undefined);
|
22
21
|
initialize(args: ReferralStateManagerArgs): Promise<void>;
|
@@ -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,EAGL,aAAa,EAGd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,mBAAmB,CAAC,EAAE,SAAS,CAAC;CACjC;AAED,qBAAa,oBAAqB,SAAQ,SAAS;
|
1
|
+
{"version":3,"file":"referralStateManager.d.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,7 +32,8 @@ class ReferralStateManager extends txHandler_1.TxHandler {
|
|
32
32
|
this.setReferredBy(args.referredByAuthority);
|
33
33
|
}
|
34
34
|
defaultLookupTables() {
|
35
|
-
return this.referralStateData?.lookupTable
|
35
|
+
return this.referralStateData?.lookupTable &&
|
36
|
+
!(0, umi_web3js_adapters_1.toWeb3JsPublicKey)(this.referralStateData.lookupTable).equals(web3_js_1.PublicKey.default)
|
36
37
|
? [this.referralStateData?.lookupTable.toString()]
|
37
38
|
: [];
|
38
39
|
}
|
@@ -51,7 +52,7 @@ class ReferralStateManager extends txHandler_1.TxHandler {
|
|
51
52
|
: referredByAuthority
|
52
53
|
? (0, utils_1.getReferralState)(referredByAuthority)
|
53
54
|
: undefined;
|
54
|
-
this.
|
55
|
+
this.referredBy = referredByAuthority;
|
55
56
|
}
|
56
57
|
updateReferralStatesIx(destFeesMint, referredBy, lookupTable) {
|
57
58
|
return (0, generated_1.updateReferralStates)(this.umi, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"txHandler.d.ts","sourceRoot":"","sources":["../../src/clients/txHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGxD,8BAAsB,SAAS;IACtB,MAAM,EAAG,MAAM,CAAC;IAChB,GAAG,EAAG,GAAG,CAAC;IACV,UAAU,EAAG,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"txHandler.d.ts","sourceRoot":"","sources":["../../src/clients/txHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGxD,8BAAsB,SAAS;IACtB,MAAM,EAAG,MAAM,CAAC;IAChB,GAAG,EAAG,GAAG,CAAC;IACV,UAAU,EAAG,UAAU,CAAC;IAExB,UAAU,CAAC,EAAE,SAAS,CAAC;gBAG5B,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,OAAO;IAYrB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIzB,QAAQ,CAAC,mBAAmB,IAAI,MAAM,EAAE;IAExC,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAE7D,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI;CACrD"}
|
@@ -58,7 +58,7 @@ async function transactionChoresBefore(client, accountsGettingCreated, solautoAc
|
|
58
58
|
(client.authorityLutAddress !== undefined &&
|
59
59
|
client.referralStateManager.referralStateData.lookupTable ==
|
60
60
|
(0, umi_1.publicKey)(web3_js_1.PublicKey.default))) {
|
61
|
-
chores = chores.add(client.referralStateManager.updateReferralStatesIx(undefined, client.referralStateManager.
|
61
|
+
chores = chores.add(client.referralStateManager.updateReferralStatesIx(undefined, client.referralStateManager.referredBy, client.authorityLutAddress));
|
62
62
|
}
|
63
63
|
if (client.selfManaged) {
|
64
64
|
if (client.solautoPositionData === null) {
|
package/package.json
CHANGED
@@ -37,7 +37,6 @@ export class ReferralStateManager extends TxHandler {
|
|
37
37
|
public referralState!: PublicKey;
|
38
38
|
public referralStateData!: ReferralState | null;
|
39
39
|
|
40
|
-
public referredByAuthority?: PublicKey;
|
41
40
|
public referredByState?: PublicKey;
|
42
41
|
|
43
42
|
constructor(
|
@@ -76,7 +75,10 @@ export class ReferralStateManager extends TxHandler {
|
|
76
75
|
}
|
77
76
|
|
78
77
|
defaultLookupTables(): string[] {
|
79
|
-
return this.referralStateData?.lookupTable
|
78
|
+
return this.referralStateData?.lookupTable &&
|
79
|
+
!toWeb3JsPublicKey(this.referralStateData!.lookupTable).equals(
|
80
|
+
PublicKey.default
|
81
|
+
)
|
80
82
|
? [this.referralStateData?.lookupTable.toString()]
|
81
83
|
: [];
|
82
84
|
}
|
@@ -98,7 +100,7 @@ export class ReferralStateManager extends TxHandler {
|
|
98
100
|
: referredByAuthority
|
99
101
|
? getReferralState(referredByAuthority!)
|
100
102
|
: undefined;
|
101
|
-
this.
|
103
|
+
this.referredBy = referredByAuthority;
|
102
104
|
}
|
103
105
|
|
104
106
|
updateReferralStatesIx(
|
package/src/clients/txHandler.ts
CHANGED
@@ -150,7 +150,7 @@ async function transactionChoresBefore(
|
|
150
150
|
chores = chores.add(
|
151
151
|
client.referralStateManager.updateReferralStatesIx(
|
152
152
|
undefined,
|
153
|
-
client.referralStateManager.
|
153
|
+
client.referralStateManager.referredBy,
|
154
154
|
client.authorityLutAddress
|
155
155
|
)
|
156
156
|
);
|