mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 10:56:24 +00:00
Add bond size to order book
This commit is contained in:
parent
9a6d3d33a4
commit
0a100802f2
@ -54,6 +54,7 @@ class ListOrderSerializer(serializers.ModelSerializer):
|
||||
"maker",
|
||||
"taker",
|
||||
"escrow_duration",
|
||||
"bond_size"
|
||||
)
|
||||
|
||||
|
||||
|
@ -457,6 +457,19 @@ const BookTable = ({
|
||||
};
|
||||
};
|
||||
|
||||
const bondObj = function (width: number, hide: boolean) {
|
||||
return {
|
||||
hide,
|
||||
field: 'bond_size',
|
||||
headerName: t('Bond'),
|
||||
type: 'number',
|
||||
width: width * fontSize,
|
||||
renderCell: (params:any) => {
|
||||
return <div style={{ cursor: 'pointer' }}>{`${Number(params.row.bond_size)}%`}</div>;
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const columnSpecs = {
|
||||
amount: {
|
||||
priority: 1,
|
||||
@ -546,8 +559,16 @@ const BookTable = ({
|
||||
object: typeObj,
|
||||
},
|
||||
},
|
||||
id: {
|
||||
bond: {
|
||||
priority: 11,
|
||||
order: 10,
|
||||
normal: {
|
||||
width: 4.2,
|
||||
object: bondObj,
|
||||
},
|
||||
},
|
||||
id: {
|
||||
priority: 12,
|
||||
order: 12,
|
||||
normal: {
|
||||
width: 4.8,
|
||||
|
@ -15,6 +15,7 @@ export interface Order {
|
||||
satoshis: number;
|
||||
satoshis_now: number;
|
||||
bondless_taker: boolean;
|
||||
bond_size: number;
|
||||
maker: number;
|
||||
escrow_duration: number;
|
||||
maker_nick: string;
|
||||
|
Loading…
Reference in New Issue
Block a user