Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
setToken -> saveToken
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Nov 22, 2021
1 parent 04b7ef1 commit 0c995ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/screens/Swap/FTX/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export function SwapConnectFTX({
${isKYC && `localStorage.setItem("authToken", "${token}");`}
localStorage.setItem("theme", "${dark ? "dark" : "light"}");
window.ledger.setToken = token => {
window.ledger.saveToken = token => {
const message = JSON.stringify({
type: "setToken",
type: "saveToken",
token,
});
window.ledger.postMessage(message);
Expand All @@ -53,8 +53,8 @@ export function SwapConnectFTX({
try {
const data: Message = JSON.parse(dataStr);
switch (data.type) {
case "setToken":
saveToken(data.authToken);
case "saveToken":
saveToken(data.token);
break;
case "closeWidget":
navigation.pop();
Expand Down Expand Up @@ -106,7 +106,7 @@ function useFTXToken() {
};
}

type Message = { type: "setToken", token: string } | { type: "closeWidget" };
type Message = { type: "saveToken", token: string } | { type: "closeWidget" };

const styles = StyleSheet.create({
root: {
Expand Down

0 comments on commit 0c995ac

Please sign in to comment.