Skip to content

Commit 71c8ed5

Browse files
committed
fix: remove Validation of coin/subnet while building move stake transaction
Ticket: SC-3247
1 parent 04e70e4 commit 71c8ed5

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

modules/sdk-coin-tao/src/lib/moveStakeTransaction.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ export class MoveStakeTransaction extends SubstrateTransaction {
4242
this._inputs.push({
4343
address: txMethod.originHotkey,
4444
value: txMethod.alphaAmount,
45-
coin: utils.getTaoTokenBySubnetId(txMethod.originNetuid).name,
4645
});
4746

4847
this._outputs.push({
4948
address: txMethod.destinationHotkey,
5049
value: txMethod.alphaAmount,
51-
coin: utils.getTaoTokenBySubnetId(txMethod.destinationNetuid).name,
5250
});
5351
}
5452

@@ -59,7 +57,6 @@ export class MoveStakeTransaction extends SubstrateTransaction {
5957
return {
6058
address: output.address,
6159
amount: output.value,
62-
tokenName: output.coin,
6360
};
6461
});
6562

modules/sdk-coin-tao/test/unit/transactionBuilder/moveStakeBuilder.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ describe('Tao Move Stake Builder', function () {
112112
explanation.outputs[0].should.deepEqual({
113113
address: '5Ffp1wJCPu4hzVDTo7XaMLqZSvSadyUQmxWPDw74CBjECSoq',
114114
amount: '9007199254740995',
115-
tokenName: utils.getTaoTokenBySubnetId('1').name,
116115
});
117116
});
118117

@@ -155,8 +154,6 @@ describe('Tao Move Stake Builder', function () {
155154
txJson.destinationNetuid.should.equal('2');
156155
txJson.alphaAmount.should.equal('1000000000000');
157156

158-
const explanation = tx.explainTransaction();
159-
explanation.outputs[0].tokenName.should.equal('ttao:onion');
160157
});
161158
});
162159

@@ -470,7 +467,7 @@ describe('Tao Move Stake Builder', function () {
470467

471468
explanation.should.have.properties(['outputs', 'outputAmount', 'changeAmount', 'fee', 'type']);
472469
explanation.outputs.should.have.length(1);
473-
explanation.outputs[0].should.have.properties(['address', 'amount', 'tokenName']);
470+
explanation.outputs[0].should.have.properties(['address', 'amount']);
474471
explanation.outputs[0].address.should.equal('5Ffp1wJCPu4hzVDTo7XaMLqZSvSadyUQmxWPDw74CBjECSoq');
475472
explanation.outputs[0].amount.should.equal('1000000000000');
476473
explanation.changeAmount.should.equal('0');

0 commit comments

Comments
 (0)