File tree Expand file tree Collapse file tree 5 files changed +13
-1
lines changed
rust/tw_coin_registry/src Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ def self.camel_case(id)
2626 id [ 0 ] . upcase + id [ 1 ..] . downcase
2727end
2828
29+ def self . upper_camel_case ( id )
30+ id . split ( '_' ) . map { |w | w . capitalize } . join
31+ end
32+
2933def self . coin_img ( coin )
3034 "<img src=\" https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/#{ coin } /info/logo.png\" width=\" 32\" />"
3135end
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def derivation_name(deriv)
1414# Returns a string of `<Coin><Derivation>` if derivation's name is specified, otherwise returns `Default`.
1515def derivation_enum_name_no_prefix ( deriv , coin )
1616 return "Default" if deriv [ 'name' ] . nil?
17- format_name ( coin [ 'name' ] ) + camel_case ( deriv [ 'name' ] )
17+ format_name ( coin [ 'name' ] ) + upper_camel_case ( deriv [ 'name' ] )
1818end
1919
2020# Returns a string of `TWDerivation<Coin><Derivation>` if derivation's name is specified, otherwise returns `TWDerivationDefault`.
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ enum TWDerivation {
2727 TWDerivationBitcoinTaproot = 8 ,
2828 TWDerivationPactusMainnet = 9 ,
2929 TWDerivationPactusTestnet = 10 ,
30+ TWDerivationSmartChainStableAccount = 11 ,
3031 // end_of_derivation_enum - USED TO GENERATE CODE
3132};
3233
Original file line number Diff line number Diff line change 30903090 "derivation" : [
30913091 {
30923092 "path" : " m/44'/60'/0'/0/0"
3093+ },
3094+ {
3095+ "name" : " stable_account" ,
3096+ "path" : " m/44'/60'/9172'/3604/9999" ,
3097+ "description" : " TrustWallet's specific derivation path for Stable Account wallets"
30933098 }
30943099 ],
30953100 "curve" : " secp256k1" ,
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ pub enum TWDerivation {
2020 BitcoinTaproot = 8 ,
2121 PactusMainnet = 9 ,
2222 PactusTestnet = 10 ,
23+ SmartChainStableAccount = 11 ,
2324 // end_of_derivation_enum - USED TO GENERATE CODE
2425 #[ default]
2526 Default = 0 ,
@@ -36,6 +37,7 @@ impl From<TWDerivation> for Derivation {
3637 TWDerivation :: BitcoinTaproot => Derivation :: Taproot ,
3738 TWDerivation :: PactusMainnet => Derivation :: Default ,
3839 TWDerivation :: PactusTestnet => Derivation :: Testnet ,
40+ TWDerivation :: SmartChainStableAccount => Derivation :: Default ,
3941 }
4042 }
4143}
You can’t perform that action at this time.
0 commit comments