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

backport changes to dev #54

Merged
merged 4 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/prod_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ jobs:
run: yarn update-deposits && yarn build

- name: Install Playwright Browsers
run: yarn playwright install
run: |
yarn add playwright --dev
yarn playwright install

- name: Setup xvfb
run: |
sudo apt-get update
sudo apt-get install -y xvfb

- name: Run tests
run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' yarn run-e2e-tests
# - name: Run tests
# run: xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' yarn run-e2e-tests

- name: Configure AWS Production credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down Expand Up @@ -94,4 +96,4 @@ jobs:
service: GC Deposit UI
success: ${{ contains(join(needs.*.result, ','), 'success') }}
message: "deploy service `GC Deposit UI` version `${{ inputs.tag }}`. Triggered by `${{ github.actor }}`."


14 changes: 10 additions & 4 deletions hooks/use-dappnode-deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function useDappnodeDeposit(contractConfig: ContractNetwork | undefined, address

return { deposits: newDeposits, hasDuplicates, _isBatch };
},
[address, contractConfig, deposits]
[address, contractConfig, deposits, user]
);

const setDappnodeDepositData = useCallback(
Expand Down Expand Up @@ -202,9 +202,15 @@ function useDappnodeDeposit(contractConfig: ContractNetwork | undefined, address
deposit_data_roots: string[]
} = {pubkeys:'',signatures:'',deposit_data_roots:[]};

deposits.forEach((deposit) => {
data.pubkeys += deposit.pubkey.startsWith('0x') ? deposit.pubkey : `0x${deposit.pubkey}`;
data.signatures += deposit.signature.startsWith('0x') ? deposit.signature : `0x${deposit.signature}`;
deposits.forEach((deposit, i) => {
if (i === 0) {
data.pubkeys += deposit.pubkey.startsWith('0x') ? deposit.pubkey : `0x${deposit.pubkey}`;
data.signatures += deposit.signature.startsWith('0x') ? deposit.signature : `0x${deposit.signature}`;
} else {
data.pubkeys += deposit.pubkey.startsWith('0x') ? deposit.pubkey.slice(2) : deposit.pubkey;
data.signatures += deposit.signature.startsWith('0x') ? deposit.signature.slice(2) : deposit.signature;
}

data.deposit_data_roots.push(deposit.deposit_data_root.startsWith('0x') ? deposit.deposit_data_root : `0x${deposit.deposit_data_root}`);
});

Expand Down
Loading