proof-of-take-sdk 3.1.1 → 3.1.2
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.
|
@@ -76,7 +76,9 @@ async function joinSeason(options) {
|
|
|
76
76
|
methodBuilder.remainingAccounts(remainingAccounts);
|
|
77
77
|
}
|
|
78
78
|
const instruction = await methodBuilder.instruction();
|
|
79
|
-
|
|
79
|
+
// For star joins, make the transaction fully sponsored: force the fee payer to be the root admin.
|
|
80
|
+
// This prevents clients from accidentally using an unfunded/nonexistent fee payer account.
|
|
81
|
+
const feePayer = options.star ? constants_1.ADMIN_PUBLIC_KEY : (0, signerHelpers_1.getDefaultFeePayer)(options.feePayer);
|
|
80
82
|
const signers = (0, signerHelpers_1.buildSigners)([(0, signerHelpers_1.asAdminSigner)(constants_1.ADMIN_PUBLIC_KEY), (0, signerHelpers_1.asUserSigner)(options.user)], feePayer);
|
|
81
83
|
// OPTIMISTIC UPDATES
|
|
82
84
|
const curr = options.currentAccounts || {};
|