Skip to content

Commit

Permalink
devop: merge changes from kadena team
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Oct 11, 2023
1 parent 13a7df5 commit 57ad399
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ const method: MiddlewareFunction = function (
selectedNetwork: selectedNetworkName
? getNetworkInfo(selectedNetworkName)
: null,
selectedAccountAddress: account?.address || "",
selectedAccountAddress: this.network.displayAddress(
account?.address || ""
),
accounts: accounts.map((acc) => {
return {
address: acc.address,
publicKey: acc.publicKey,
address: this.network.displayAddress(acc.address),
publicKey: acc.publicKey.replace("0x", ""),
genesisHash: "",
name: acc.name,
type: acc.signerType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const method: MiddlewareFunction = function (

const reqPayload = payload.params[0];

this.KeyRing.getAccount(reqPayload.address)
this.KeyRing.getAccount(reqPayload.address.replace("k:", "0x"))
.then((account) => {
const windowPromise = new WindowPromise();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
</template>

<script setup lang="ts">
import { blake2AsU8a } from "@polkadot/util-crypto";
import { bufferToHex } from "@enkryptcom/utils";
import SignLogo from "@action/icons/common/sign-logo.vue";
import BaseButton from "@action/components/base-button/index.vue";
import CommonPopup from "@action/views/common-popup/index.vue";
Expand Down Expand Up @@ -78,7 +80,6 @@ const account = ref({ address: "" } as EnkryptAccount);
onBeforeMount(async () => {
const { Request, options } = await windowPromise;
console.log(Request.value.params);
Options.value = options;
message.value = Request.value.params![0].data;
account.value = Request.value.params![1] as EnkryptAccount;
Expand All @@ -96,11 +97,11 @@ const approve = async () => {
TransactionSigner({
account,
network: network.value,
payload: msg.data,
payload: bufferToHex(blake2AsU8a(msg.data)),
})
.then((res) => {
Resolve.value({
result: res.result as string,
result: res.result?.replace("0x", "") as string,
});
})
.catch((er) => {
Expand Down

1 comment on commit 57ad399

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.