( app: web3.PublicKey, tier: web3.PublicKey, subscriber: web3.Keypair, subscriberAta: web3.PublicKey )
| 231 | ) |
| 232 | |
| 233 | export async function cancelSubscription( |
| 234 | app: web3.PublicKey, |
| 235 | tier: web3.PublicKey, |
| 236 | subscriber: web3.Keypair, |
| 237 | subscriberAta: web3.PublicKey |
| 238 | ) { |
| 239 | let [subscription] = subscriptionAccountKey(subscriber.publicKey, app) |
| 240 | let thread = subscriptionThreadKey(subscription) |
| 241 | |
| 242 | await global.program.methods |
| 243 | .cancelSubscription() |
| 244 | .accounts({ |
| 245 | app, |
| 246 | tier, |
| 247 | subscriber: subscriber.publicKey, |
| 248 | subscriberAta, |
| 249 | subscriptionThread: thread, |
| 250 | threadProgram: THREAD_PROGRAM, |
| 251 | }) |
| 252 | .signers([subscriber]) |
| 253 | .rpc() |
| 254 | } |
| 255 | |
| 256 | export async function completePayment( |
| 257 | app: web3.PublicKey, |
no test coverage detected