Skip to content

Commit

Permalink
merge-conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-vincent committed Jun 14, 2024
2 parents cbdcd22 + 03a585c commit 57727de
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions clients/bolt-sdk/.crates/.crates.toml

This file was deleted.

1 change: 0 additions & 1 deletion clients/bolt-sdk/.crates/.crates2.json

This file was deleted.

Binary file removed clients/bolt-sdk/.crates/bin/anchor
Binary file not shown.
1 change: 1 addition & 0 deletions clients/bolt-sdk/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
lib
.crates
3 changes: 1 addition & 2 deletions clients/bolt-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@ export function FindEntityPda(
worldId = CastToBN(worldId);
entityId = CastToBN(entityId);
const worldIdBuffer = Buffer.from(worldId.toArrayLike(Buffer, "be", 8));
const entityIdBuffer = Buffer.from(entityId.toArrayLike(Buffer, "be", 8));
const seeds = [Buffer.from("entity"), worldIdBuffer];
if (extraSeed != null) {
seeds.push(Buffer.from(new Uint8Array(8)));
seeds.push(Buffer.from(extraSeed));
} else {
seeds.push(entityIdBuffer);
seeds.push(Buffer.from(entityId.toArrayLike(Buffer, "be", 8)));
}
return PublicKey.findProgramAddressSync(seeds, programId)[0];
}
Expand Down
6 changes: 4 additions & 2 deletions clients/bolt-sdk/src/world/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export async function AddEntity({
const worldInstance = await World.fromAccountAddress(connection, world);
const entityPda = FindEntityPda(
new BN(worldInstance.id),
new BN(worldInstance.entities)
new BN(worldInstance.entities),
seed
);
const createEntityIx = createAddEntityInstruction(
{
Expand Down Expand Up @@ -121,6 +122,7 @@ export async function InitializeComponent({
authority: authority ?? PROGRAM_ID,
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY,
anchorRemainingAccounts,
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY,
});

return {
Expand Down Expand Up @@ -170,7 +172,7 @@ function createApplySystemInstruction({
}

const instructionArgs = {
authority,
authority: authority ?? PROGRAM_ID,
boltSystem: systemId,
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_PUBKEY,
anchorRemainingAccounts: extraAccounts,
Expand Down

0 comments on commit 57727de

Please sign in to comment.