mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
Merge branch 'dev' into dev
This commit is contained in:
@@ -184,8 +184,6 @@ def page_bids(self, url_split, post_string, sent=False, available=False, receive
|
||||
|
||||
bids = swap_client.listBids(sent=sent, filters=filters)
|
||||
|
||||
bids_count = len(bids)
|
||||
|
||||
page_data = {
|
||||
'bid_states': listBidStates(),
|
||||
}
|
||||
@@ -203,5 +201,5 @@ def page_bids(self, url_split, post_string, sent=False, available=False, receive
|
||||
'summary': summary,
|
||||
'bids': [(format_timestamp(b[0]),
|
||||
b[2].hex(), b[3].hex(), strBidState(b[5]), strTxState(b[7]), strTxState(b[8]), b[11]) for b in bids],
|
||||
'bids_count': bids_count, # Pass the count of offers to the template
|
||||
'bids_count': len(bids),
|
||||
})
|
||||
|
||||
@@ -25,7 +25,6 @@ from basicswap.db import (
|
||||
from basicswap.util import (
|
||||
ensure,
|
||||
format_amount,
|
||||
format_timestamp,
|
||||
)
|
||||
from basicswap.basicswap_util import (
|
||||
SwapTypes,
|
||||
@@ -43,6 +42,7 @@ from basicswap.chainparams import (
|
||||
|
||||
default_chart_api_key = '95dd900af910656e0e17c41f2ddc5dba77d01bf8b0e7d2787634a16bd976c553'
|
||||
|
||||
|
||||
def value_or_none(v):
|
||||
if v == -1 or v == '-1':
|
||||
return None
|
||||
@@ -661,8 +661,6 @@ def page_offer(self, url_split, post_string):
|
||||
'summary': summary,
|
||||
})
|
||||
|
||||
import time
|
||||
|
||||
def format_timestamp(timestamp, with_ago=True, is_expired=False):
|
||||
current_time = int(time.time())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user