mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-28 14:53:57 +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 robot = slot?.getRobot();
|
||||
if (robot != null && slot?.token != null) {
|
||||
void federation.fetchRobot(garage, slot.token);
|
||||
coordinator
|
||||
.fetchOrder(currentOrderId, robot, slot.token)
|
||||
.then((order) => {
|
||||
|
@ -40,14 +40,6 @@ const statusToDelay = [
|
||||
300000, // 'Taker lost dispute'
|
||||
];
|
||||
|
||||
export interface fetchRobotProps {
|
||||
coordinator?: Coordinator;
|
||||
newKeys?: { encPrivKey: string; pubKey: string };
|
||||
newToken?: string;
|
||||
slot?: number;
|
||||
isRefresh?: boolean;
|
||||
}
|
||||
|
||||
export interface FederationContextProviderProps {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}, [open.profile, hostUrl]);
|
||||
}, [open.profile]);
|
||||
|
||||
return (
|
||||
<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;
|
||||
|
||||
const robot = garage?.getSlot(token)?.getRobot() ?? null;
|
||||
|
@ -114,7 +114,7 @@ export class Federation {
|
||||
// Fetchs
|
||||
fetchRobot = async (garage: Garage, token: string): Promise<void> => {
|
||||
Object.values(this.coordinators).forEach((coor) => {
|
||||
void coor.fecthRobot(garage, token);
|
||||
void coor.fetchRobot(garage, token);
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user