mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-29 07:15:36 +03:00
Small fixes
This commit is contained in:
parent
9d8c8d5e0d
commit
c98e643645
@ -65,7 +65,6 @@ const OrderPage = (): JSX.Element => {
|
|||||||
const slot = garage.getSlot();
|
const slot = garage.getSlot();
|
||||||
const robot = slot?.getRobot();
|
const robot = slot?.getRobot();
|
||||||
if (robot != null && slot?.token != null) {
|
if (robot != null && slot?.token != null) {
|
||||||
void federation.fetchRobot(garage, slot.token);
|
|
||||||
coordinator
|
coordinator
|
||||||
.fetchOrder(currentOrderId, robot, slot.token)
|
.fetchOrder(currentOrderId, robot, slot.token)
|
||||||
.then((order) => {
|
.then((order) => {
|
||||||
|
@ -40,14 +40,6 @@ const statusToDelay = [
|
|||||||
300000, // 'Taker lost dispute'
|
300000, // 'Taker lost dispute'
|
||||||
];
|
];
|
||||||
|
|
||||||
export interface fetchRobotProps {
|
|
||||||
coordinator?: Coordinator;
|
|
||||||
newKeys?: { encPrivKey: string; pubKey: string };
|
|
||||||
newToken?: string;
|
|
||||||
slot?: number;
|
|
||||||
isRefresh?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FederationContextProviderProps {
|
export interface FederationContextProviderProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
@ -167,7 +159,7 @@ export const FederationContextProvider = ({
|
|||||||
void federation.fetchRobot(garage, slot.token); // create new robot with existing token and keys (on network and coordinator change)
|
void federation.fetchRobot(garage, slot.token); // create new robot with existing token and keys (on network and coordinator change)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [open.profile, hostUrl]);
|
}, [open.profile]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FederationContext.Provider
|
<FederationContext.Provider
|
||||||
|
@ -293,7 +293,7 @@ export class Coordinator {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
fecthRobot = async (garage: Garage, token: string): Promise<Robot | null> => {
|
fetchRobot = async (garage: Garage, token: string): Promise<Robot | null> => {
|
||||||
if (!this.enabled || !token) return null;
|
if (!this.enabled || !token) return null;
|
||||||
|
|
||||||
const robot = garage?.getSlot(token)?.getRobot() ?? null;
|
const robot = garage?.getSlot(token)?.getRobot() ?? null;
|
||||||
|
@ -114,7 +114,7 @@ export class Federation {
|
|||||||
// Fetchs
|
// Fetchs
|
||||||
fetchRobot = async (garage: Garage, token: string): Promise<void> => {
|
fetchRobot = async (garage: Garage, token: string): Promise<void> => {
|
||||||
Object.values(this.coordinators).forEach((coor) => {
|
Object.values(this.coordinators).forEach((coor) => {
|
||||||
void coor.fecthRobot(garage, token);
|
void coor.fetchRobot(garage, token);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user