Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serialialize-instruction-data-frontend more changes (was refactor(): replace deprecated findProgramAddress with findProgramAddressSync) #346

Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ the following, where `pda` is the address to the account where data will be
stored:

```typescript
const [pda] = await web3.PublicKey.findProgramAddress(
const [pda] = await web3.PublicKey.findProgramAddressSync(
[publicKey.toBuffer(), Buffer.from(movie.title)],
new web3.PublicKey(MOVIE_REVIEW_PROGRAM_ID),
);
Expand All @@ -499,7 +499,7 @@ const handleTransactionSubmit = async (movie: Movie) => {
const buffer = movie.serialize();
const transaction = new web3.Transaction();

const [pda] = await web3.PublicKey.findProgramAddress(
const [pda] = await web3.PublicKey.findProgramAddressSync(
[publicKey.toBuffer(), new TextEncoder().encode(movie.title)],
new web3.PublicKey(MOVIE_REVIEW_PROGRAM_ID),
);
Expand Down
Loading