Skip to content

Commit

Permalink
Merge pull request #743 from invariant-labs/dev
Browse files Browse the repository at this point in the history
Update staging env
  • Loading branch information
wojciech-cichocki authored Oct 23, 2024
2 parents 967c16d + aef0bbc commit 395a262
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
Binary file modified public/math-spec-a0.pdf
Binary file not shown.
Binary file modified public/math-spec-alph.pdf
Binary file not shown.
Binary file modified public/recruitment-tasks.pdf
Binary file not shown.
16 changes: 8 additions & 8 deletions src/store/sagas/bonds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function* handleBuyBondWithWSOL(data: BuyBond) {

const initialTx = new Transaction().add(createIx).add(transferIx).add(initIx)

const initialBlockhash = yield* call([connection, connection.getRecentBlockhash])
const initialBlockhash = yield* call([connection, connection.getLatestBlockhash])
initialTx.recentBlockhash = initialBlockhash.blockhash
initialTx.feePayer = wallet.publicKey

Expand All @@ -155,12 +155,12 @@ export function* handleBuyBondWithWSOL(data: BuyBond) {
},
bondKeypair.publicKey
)
const bondBlockhash = yield* call([connection, connection.getRecentBlockhash])
const bondBlockhash = yield* call([connection, connection.getLatestBlockhash])
bondTx.recentBlockhash = bondBlockhash.blockhash
bondTx.feePayer = wallet.publicKey

const unwrapTx = new Transaction().add(unwrapIx)
const unwrapBlockhash = yield* call([connection, connection.getRecentBlockhash])
const unwrapBlockhash = yield* call([connection, connection.getLatestBlockhash])
unwrapTx.recentBlockhash = unwrapBlockhash.blockhash
unwrapTx.feePayer = wallet.publicKey

Expand Down Expand Up @@ -339,7 +339,7 @@ export function* handleBuyBond(action: PayloadAction<BuyBond>) {
},
bondKeypair.publicKey
)
const blockhash = yield* call([connection, connection.getRecentBlockhash])
const blockhash = yield* call([connection, connection.getLatestBlockhash])
tx.recentBlockhash = blockhash.blockhash
tx.feePayer = wallet.publicKey

Expand Down Expand Up @@ -452,7 +452,7 @@ export function* handleRedeemBondWithWSOL(data: RedeemBond) {

const initialTx = new Transaction().add(createIx).add(initIx)

const initialBlockhash = yield* call([connection, connection.getRecentBlockhash])
const initialBlockhash = yield* call([connection, connection.getLatestBlockhash])
initialTx.recentBlockhash = initialBlockhash.blockhash
initialTx.feePayer = wallet.publicKey

Expand All @@ -461,12 +461,12 @@ export function* handleRedeemBondWithWSOL(data: RedeemBond) {
bondId: data.bondId,
ownerBondAccount: wrappedSolAccount.publicKey
})
const blockhash = yield* call([connection, connection.getRecentBlockhash])
const blockhash = yield* call([connection, connection.getLatestBlockhash])
redeemTx.recentBlockhash = blockhash.blockhash
redeemTx.feePayer = wallet.publicKey

const unwrapTx = new Transaction().add(unwrapIx)
const unwrapBlockhash = yield* call([connection, connection.getRecentBlockhash])
const unwrapBlockhash = yield* call([connection, connection.getLatestBlockhash])
unwrapTx.recentBlockhash = unwrapBlockhash.blockhash
unwrapTx.feePayer = wallet.publicKey

Expand Down Expand Up @@ -636,7 +636,7 @@ export function* handleRedeemBond(action: PayloadAction<RedeemBond>) {
bondId: action.payload.bondId,
ownerBondAccount
})
const blockhash = yield* call([connection, connection.getRecentBlockhash])
const blockhash = yield* call([connection, connection.getLatestBlockhash])
tx.recentBlockhash = blockhash.blockhash
tx.feePayer = wallet.publicKey

Expand Down
6 changes: 3 additions & 3 deletions src/store/sagas/farms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ export function* handleWithdrawRewardsWithWSOL(data: FarmPositionData) {

const initialTx = new Transaction().add(createIx).add(initIx)

const initialBlockhash = yield* call([connection, connection.getRecentBlockhash])
const initialBlockhash = yield* call([connection, connection.getLatestBlockhash])
initialTx.recentBlockhash = initialBlockhash.blockhash
initialTx.feePayer = wallet.publicKey

Expand Down Expand Up @@ -747,12 +747,12 @@ export function* handleWithdrawRewardsWithWSOL(data: FarmPositionData) {
})

const withdrawTx = new Transaction().add(updateIx).add(withdrawIx)
const blockhash = yield* call([connection, connection.getRecentBlockhash])
const blockhash = yield* call([connection, connection.getLatestBlockhash])
withdrawTx.recentBlockhash = blockhash.blockhash
withdrawTx.feePayer = wallet.publicKey

const unwrapTx = new Transaction().add(unwrapIx)
const unwrapBlockhash = yield* call([connection, connection.getRecentBlockhash])
const unwrapBlockhash = yield* call([connection, connection.getLatestBlockhash])
unwrapTx.recentBlockhash = unwrapBlockhash.blockhash
unwrapTx.feePayer = wallet.publicKey

Expand Down
6 changes: 3 additions & 3 deletions src/store/sagas/positions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@ function* handleInitPositionAndPoolWithSOL(action: PayloadAction<InitPositionDat
)
}

const initialBlockhash = yield* call([connection, connection.getRecentBlockhash])
const initialBlockhash = yield* call([connection, connection.getLatestBlockhash])
initialTx.recentBlockhash = initialBlockhash.blockhash
initialTx.feePayer = wallet.publicKey

const initPositionBlockhash = yield* call([connection, connection.getRecentBlockhash])
const initPositionBlockhash = yield* call([connection, connection.getLatestBlockhash])
initPositionTx.recentBlockhash = initPositionBlockhash.blockhash
initPositionTx.feePayer = wallet.publicKey

Expand All @@ -192,7 +192,7 @@ function* handleInitPositionAndPoolWithSOL(action: PayloadAction<InitPositionDat
)
}

const unwrapBlockhash = yield* call([connection, connection.getRecentBlockhash])
const unwrapBlockhash = yield* call([connection, connection.getLatestBlockhash])
unwrapTx.recentBlockhash = unwrapBlockhash.blockhash
unwrapTx.feePayer = wallet.publicKey

Expand Down
4 changes: 2 additions & 2 deletions src/store/sagas/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export function* getCollateralTokenAirdrop(
}
const tx = instructions.reduce((tx, ix) => tx.add(ix), new Transaction())
const connection = yield* call(getConnection)
const blockhash = yield* call([connection, connection.getRecentBlockhash])
const blockhash = yield* call([connection, connection.getLatestBlockhash])
tx.feePayer = wallet.publicKey
tx.recentBlockhash = blockhash.blockhash
const signedTx = yield* call([wallet, wallet.signTransaction], tx)
Expand All @@ -227,7 +227,7 @@ export function* getCollateralTokenAirdrop(

export function* signAndSend(wallet: WalletAdapter, tx: Transaction): SagaGenerator<string> {
const connection = yield* call(getConnection)
const blockhash = yield* call([connection, connection.getRecentBlockhash])
const blockhash = yield* call([connection, connection.getLatestBlockhash])
tx.feePayer = wallet.publicKey
tx.recentBlockhash = blockhash.blockhash
const signedTx = yield* call([wallet, wallet.signTransaction], tx)
Expand Down
2 changes: 1 addition & 1 deletion src/web3/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getSolanaConnection = (url: string): Connection => {
if (_connection && _network === url) {
return _connection
}
_connection = new Connection(url, 'recent')
_connection = new Connection(url, 'processed')
_network = url

return _connection
Expand Down

0 comments on commit 395a262

Please sign in to comment.