Skip to content

Commit a5c71a2

Browse files
test
1 parent b4b67a5 commit a5c71a2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/flare_ai_defai/api/routes/chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ async def handle_stake(self, message: str, user: UserInfo) -> dict[str, str]:
517517
formatted_preview = (
518518
"Transaction Preview: "
519519
+ f"Staking {response_json["amount"]} FLR"
520-
+ f"\nType CONFIRM to proceed."
520+
+ f"<br>Type CONFIRM to proceed."
521521
)
522522
return {"response": formatted_preview}
523523

src/flare_ai_defai/blockchain/sparkdex.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,8 @@ def swap_erc20_tokens_tx(self, user: UserInfo, token_in: str, token_out: str, am
623623
approval_tx = contract_in.functions.approve(universal_router_address, amount_in_wei).build_transaction({
624624
'from': self.wallet_store.get_address(user),
625625
'nonce': self.get_nonce(),
626-
"maxFeePerGas": (base_fee + priority_fee),
627-
"maxPriorityFeePerGas": (priority_fee),
626+
"maxFeePerGas": 2*(base_fee + priority_fee),
627+
"maxPriorityFeePerGas": 2*(priority_fee),
628628
'chainId': self.w3.eth.chain_id,
629629
"type": 2,
630630
})
@@ -643,6 +643,10 @@ def swap_erc20_tokens_tx(self, user: UserInfo, token_in: str, token_out: str, am
643643
0 # sqrtPriceLimitX96 (no limit)
644644
)
645645

646+
tx1 = self.flare_provider.create_contract_function_tx(user,
647+
universal_router, "exactInputSingle", 0,
648+
params#, gas=gas_limit
649+
)
646650

647651
swap_tx = universal_router.functions.exactInputSingle(params).build_transaction({
648652
'from': self.wallet_store.get_address(user),

0 commit comments

Comments
 (0)