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

fix btc backend error #38

Merged
merged 3 commits into from
Oct 15, 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
19 changes: 9 additions & 10 deletions backend-wbtc/src/services/blockchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ async function signHashedTransaction(
signerIndex: number
) {
const wallet = getWallet(signerIndex)
console.log(wallet.address, 'addess', signerIndex)
const domain = {
name: EIP712DOMAIN_NAME,
version: EIP712DOMAIN_VERSION,
Expand Down Expand Up @@ -79,15 +78,15 @@ export const signTransaction = async (
0
)
signatures.push(signer0)

const signer1 = await signHashedTransaction(
extractFulfillTransaction(tx),
chainId,
toBridgeAddress,
1
)
signatures.push(signer1)

if (process.env.PRIVATE_KEY2){
const signer1 = await signHashedTransaction(
extractFulfillTransaction(tx),
chainId,
toBridgeAddress,
1
)
signatures.push(signer1)
}
return signatures
} else {
throw Error('bad contract params')
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/api/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const getUrl = (symbol: Symbol) => {
}

const axiosClientToken = (token: Symbol) =>{
console.log(token, getUrl(token), 'saklsa')
return axios.create({
baseURL: getUrl(token),
transformResponse: [
Expand Down Expand Up @@ -87,7 +86,6 @@ export async function getTokenSignature(
fromUser: string,
index: number
): Promise<string | string[]> {
console.log(symbol, 'sdkd')
const [response, error] = await safe(
axiosClientToken(symbol).get<{ signature: string | string[] }>(SIGN, {
params: { fromBridgeAddress, toBridgeAssistAddress, fromChain, fromUser, index },
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/bridge/BridgeCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ const balanceAfterReceive = computed(() => {

const hasAllowance = computed(() => {
if (!token || !token.symbol) return false
if ((token.symbol === "RWA" && from.value === '42421') || (token.symbol === "RWA" && from.value === '42420') || (token.symbol === "BTC" && from.value === '200810') || (token.symbol === "BTC" && from.value === '200810')) return true
if ((token.symbol === "RWA" && from.value === '42421') || (token.symbol === "RWA" && from.value === '42420') || (token.symbol === "BTC" && from.value === '200810') || (token.symbol === "BTC" && from.value === '200901')) return true
return allowance(bridgeUI.from)
})

Expand Down
1 change: 0 additions & 1 deletion frontend/src/store/contracts/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ export const useBridge = defineContractStore<IBridgeAssistState, IBridgeAssistAc
}
this.loadingHistory = false

// console.log(signedTransactions)

return signedTransactions.map((d) => ({
...d,
Expand Down
Loading