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

Develop to main #339

Merged
merged 11 commits into from
May 29, 2024
30 changes: 30 additions & 0 deletions .github/workflows/cron-ping-ipfs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Cron ping IPFS Gateway

on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
inputs:
IPFS_CID:
description: 'IPFS CID'
required: true
type: string
GATEWAY:
description: 'Gateway'
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
name: Ping IPFS Gateway
environment: Cron ping IPFS Gateway
steps:
- name: Ping IPFS Gateway
shell: bash
run: |
BODY_RESULT=`npx -y [email protected] ping $IPFS_CID $GATEWAY`
echo "$BODY_RESULT" >> $GITHUB_STEP_SUMMARY
env:
IPFS_CID: ${{ inputs.IPFS_CID || vars.IPFS_CID }}
GATEWAY: ${{ inputs.GATEWAY || vars.GATEWAY }}
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Contributing Guidelines

Thank you for your interest in contributing to our project! We appreciate your enthusiasm and support. Currently, we are actively working on developing comprehensive contributing guidelines to ensure a smooth and collaborative contribution process.
Thank you for your interest in contributing to the project! Your enthusiasm and support are appreciated. Comprehensive contributing guidelines are actively being developed to ensure a smooth and collaborative contribution process.

**Note:** At this moment, we cannot guarantee that we will process pull requests or issues, as we are still establishing the workflow and guidelines that will make it easier for everyone to participate in the project. We understand the importance of community involvement and want to create an inclusive and comfortable environment for all contributors.
**Note:** At this moment, there is no guarantee that pull requests or issues will be processed, as the workflow and guidelines are still being established to make participation easier for everyone in the project. The importance of community involvement is understood, and an inclusive and comfortable environment for all contributors is being created.

Rest assured, as soon as the contributing guide is ready, we will be more than happy to welcome your contributions and address any issues you may encounter. We'll make an announcement when the guidelines are finalized and open for contributions.
Rest assured, as soon as the contributing guide is ready, contributions and any encountered issues will be welcomed and addressed. An announcement will be made when the guidelines are finalized and open for contributions.

In the meantime, we encourage you to explore the project, familiarize yourself with the codebase, and provide feedback or suggestions that will be valuable during this development phase.
In the meantime, exploring the project, familiarizing yourself with the codebase, and providing valuable feedback or suggestions during this development phase are encouraged.

Thank you for your patience and understanding. We look forward to your future contributions once the contributing guidelines are in place!
Thank you for your patience and understanding. Future contributions are eagerly anticipated once the contributing guidelines are in place!
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

### Reporting Security Vulnerabilities

Security is a top priority for our project. If you discover any security vulnerabilities or concerns, please responsibly disclose them through [Immunefi's bug bounty program](https://immunefi.com/bounty/lido/).
Security is a top priority for the project. If any security vulnerabilities or concerns are discovered, they should be responsibly disclosed through [Immunefi's bug bounty program](https://immunefi.com/bounty/lido/).

We value your efforts in helping us maintain a secure environment for all users. Thank you for your contribution to the project's safety.
Efforts in maintaining a secure environment for all users are highly valued. Thank you for your contribution to the project's safety.
36 changes: 14 additions & 22 deletions features/stake/stake-form/use-stake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ export const useStake = ({ onConfirm, onRetry }: StakeOptions) => {
const { staticRpcProvider } = useCurrentStaticRpcProvider();
const { providerWeb3, providerRpc } = useSDK();
const { txModalStages } = useTxModalStagesStake();
const { isLedgerLive, isLedger } = useConnectorInfo();

// modifying calldata brakes clear sign
const shouldApplyCalldataSuffix = !isLedger && !isLedgerLive;
// modifying calldata brakes clear sign for LedgerLive
const shouldApplyCalldataSuffix = !useConnectorInfo().isLedgerLive;

return useCallback(
async ({ amount, referral }: StakeArguments): Promise<boolean> => {
Expand Down Expand Up @@ -67,37 +66,30 @@ export const useStake = ({ onConfirm, onRetry }: StakeOptions) => {
]);

const callback = async () => {
const tx = await stethContractWeb3.populateTransaction.submit(
referralAddress,
{
value: amount,
},
);

if (shouldApplyCalldataSuffix) applyCalldataSuffix(tx);

if (isMultisig) {
const tx = await stethContractWeb3.populateTransaction.submit(
referralAddress,
{
value: amount,
},
);
return providerWeb3.getSigner().sendUncheckedTransaction(tx);
} else {
const { maxFeePerGas, maxPriorityFeePerGas } =
await getFeeData(staticRpcProvider);
const overrides = {
value: amount,
maxPriorityFeePerGas,
maxFeePerGas,
};

const tx = await stethContractWeb3.populateTransaction.submit(
referralAddress,
overrides,
);

if (shouldApplyCalldataSuffix) applyCalldataSuffix(tx);
tx.maxFeePerGas = maxFeePerGas;
tx.maxPriorityFeePerGas = maxPriorityFeePerGas;

const originalGasLimit = await providerWeb3.estimateGas(tx);
const gasLimit = applyGasLimitRatio(originalGasLimit);

tx.gasLimit = gasLimit;

const signer = providerWeb3.getSigner();
return signer.sendTransaction(tx);
return providerWeb3.getSigner().sendTransaction(tx);
}
};

Expand Down
Loading