Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into governance-vue
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino committed Nov 25, 2024
2 parents 7dce9a2 + 7bfb6ce commit 2129242
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 63 deletions.
6 changes: 2 additions & 4 deletions scripts/composables/use_wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const useWallet = defineStore('wallet', () => {
const getKeyToBackup = async () => await wallet.getKeyToBackup();
const getKeyToExport = () => wallet.getKeyToExport();
const isEncrypted = ref(true);
const loadFromDisk = () => wallet.loadFromDisk();
const hasShield = ref(wallet.hasShield());
const getNewAddress = (nReceiving) => wallet.getNewAddress(nReceiving);
const blockCount = ref(0);
Expand All @@ -74,7 +73,7 @@ export const useWallet = defineStore('wallet', () => {
wallet.setShield(shield);
hasShield.value = wallet.hasShield();
};
const getAddress = () => wallet.getAddress();
const getNewChangeAddress = () => wallet.getNewChangeAddress();
const isHardwareWallet = ref(wallet.isHardwareWallet());
const isHD = ref(wallet.isHD());
const checkDecryptPassword = async (passwd) =>
Expand Down Expand Up @@ -167,8 +166,8 @@ export const useWallet = defineStore('wallet', () => {
isHardwareWallet,
checkDecryptPassword,
encrypt,
getAddress,
getNewAddress,
getNewChangeAddress,
wipePrivateData: () => {
wallet.wipePrivateData();
isViewOnly.value = wallet.isViewOnly();
Expand All @@ -184,7 +183,6 @@ export const useWallet = defineStore('wallet', () => {
price,
sync,
createAndSendTransaction,
loadFromDisk,
coldBalance,
getMasternodeUTXOs,
getPath,
Expand Down
2 changes: 1 addition & 1 deletion scripts/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export async function sweepAddress(arrUTXOs, sweepingMasterKey, nFixedFee) {
const txBuilder = TransactionBuilder.create().addUTXOs(arrUTXOs);

const outputValue = txBuilder.valueIn - (nFixedFee || txBuilder.getFee());
const [address] = wallet.getNewAddress(1);
const address = wallet.getNewChangeAddress();
const tx = txBuilder
.addOutput({
address,
Expand Down
2 changes: 1 addition & 1 deletion scripts/stake/Stake.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function unstake(value) {
}
const res = await wallet.createAndSendTransaction(
getNetwork(),
wallet.getAddress(1),
wallet.getNewChangeAddress(),
value,
{
useDelegatedInputs: true,
Expand Down
Loading

0 comments on commit 2129242

Please sign in to comment.