diff --git a/Dockerfile b/Dockerfile index 47bd48c..38df1b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,5 @@ ENV GIT_URL https://github.com/obsidiansystems/kadena-transfer-js.git RUN apt-get -y update \ && apt-get -y install git \ -&& git clone -b hw-ledger-signing ${GIT_URL} \ +&& git clone -b jg-fix-ledger-transfer ${GIT_URL} \ && cp -r /kadena-transfer-js/* /usr/share/nginx/html diff --git a/docs/transfer-ledger-create.html b/docs/transfer-ledger-create.html index 8ed61e3..8601581 100644 --- a/docs/transfer-ledger-create.html +++ b/docs/transfer-ledger-create.html @@ -292,12 +292,17 @@ function formIsValid(){ return $('.form').form('is valid'); } - - async function signWithLedger(){ + + async function getLedger(){ if (!window.ledger) { var transp = await window.TranspWeb.create(); window.ledger = new window.Kadena(transp); } + } + + async function signWithLedger(){ + getLedger(); + if (document.getElementById("getPubkey-content").innerText == "") { document.getElementById("publicKey").value = [ (await window.ledger.getPublicKey("44'/626'/0'")).publicKey ]; } else { @@ -312,10 +317,7 @@ } async function getPublicKeyFromLedger(){ - if (!window.ledger) { - var transp = await window.TranspWeb.create(); - window.ledger = new window.Kadena(transp); - } + getLedger(); var publicKey = (await window.ledger.getPublicKey("44'/626'/0'")).publicKey; document.getElementById("publicKey").value = [ publicKey ];